refactor: remove loco-rs deps

This commit is contained in:
2025-03-01 15:21:14 +08:00
parent a68aab1452
commit 2844e1fc32
66 changed files with 2565 additions and 1876 deletions

View File

@@ -77,7 +77,7 @@ impl AuthServiceTrait for BasicAuthService {
{
let subscriber_auth = crate::models::auth::Model::find_by_pid(ctx, SEED_SUBSCRIBER)
.await
.map_err(AuthError::FindAuthRecordError)?;
.map_err(|_| AuthError::FindAuthRecordError)?;
return Ok(AuthUserInfo {
subscriber_auth,
auth_type: AuthType::Basic,

View File

@@ -13,7 +13,7 @@ use openidconnect::{
use serde::{Deserialize, Serialize};
use thiserror::Error;
use crate::{errors::RError, fetch::HttpClientError, models::auth::AuthType};
use crate::{fetch::HttpClientError, models::auth::AuthType};
#[derive(Debug, Error)]
pub enum AuthError {
@@ -23,7 +23,7 @@ pub enum AuthError {
current: AuthType,
},
#[error("Failed to find auth record")]
FindAuthRecordError(RError),
FindAuthRecordError,
#[error("Invalid credentials")]
BasicInvalidCredentials,
#[error(transparent)]

View File

@@ -311,7 +311,7 @@ impl AuthServiceTrait for OidcAuthService {
}
r => r,
}
.map_err(AuthError::FindAuthRecordError)?;
.map_err(|_| AuthError::FindAuthRecordError)?;
Ok(AuthUserInfo {
subscriber_auth,