refactor: remove loco-rs deps
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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)]
|
||||
|
||||
@@ -311,7 +311,7 @@ impl AuthServiceTrait for OidcAuthService {
|
||||
}
|
||||
r => r,
|
||||
}
|
||||
.map_err(AuthError::FindAuthRecordError)?;
|
||||
.map_err(|_| AuthError::FindAuthRecordError)?;
|
||||
|
||||
Ok(AuthUserInfo {
|
||||
subscriber_auth,
|
||||
|
||||
Reference in New Issue
Block a user