Fix P1 Rust: repair mangled auth lines, fix _jwt_secret constructor
Some checks failed
CI — P1 Route (Rust) / test (push) Failing after 6m52s
Some checks failed
CI — P1 Route (Rust) / test (push) Failing after 6m52s
This commit is contained in:
@@ -39,8 +39,8 @@ pub struct LocalAuthProvider {
|
||||
}
|
||||
|
||||
impl LocalAuthProvider {
|
||||
pub fn new(pool: sqlx::PgPool, _jwt_secret: String, redis: deadpool_redis::Pool) -> Self {
|
||||
Self { pool, jwt_secret, redis }
|
||||
pub fn new(pool: sqlx::PgPool, jwt_secret: String, redis: deadpool_redis::Pool) -> Self {
|
||||
Self { pool, _jwt_secret: jwt_secret, redis }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ async fn proxy_chat_completions(
|
||||
body: String,
|
||||
) -> Result<Response, ProxyError> {
|
||||
// 1. Authenticate
|
||||
let _auth_ctx = state.auth.authenticate(let auth_ctx = state.auth.authenticate(&headers).await?;headers).await?;
|
||||
let auth_ctx = state.auth.authenticate(&headers).await?;
|
||||
|
||||
// 2. Parse request
|
||||
let mut request: serde_json::Value =
|
||||
@@ -148,7 +148,7 @@ async fn proxy_embeddings(
|
||||
body: String,
|
||||
) -> Result<Response, ProxyError> {
|
||||
// Embeddings don't need routing — pass through directly
|
||||
let _auth_ctx = state.auth.authenticate(let auth_ctx = state.auth.authenticate(&headers).await?;headers).await?;
|
||||
let _auth_ctx = state.auth.authenticate(&headers).await?;
|
||||
let provider = "openai".to_string();
|
||||
let upstream_url = state.config.provider_url(&provider);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user