mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2025-06-24 23:22:30 +00:00
addressing clippy lints
This commit is contained in:
parent
1065fa3864
commit
481cb95cd2
@ -57,20 +57,11 @@ async fn delete_account(
|
|||||||
Err(ServiceError::WrongPassword)
|
Err(ServiceError::WrongPassword)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Err(RowNotFound) => return Err(ServiceError::UsernameNotFound),
|
Err(RowNotFound) => Err(ServiceError::UsernameNotFound),
|
||||||
Err(_) => return Err(ServiceError::InternalServerError),
|
Err(_) => Err(ServiceError::InternalServerError),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn services(cfg: &mut actix_web::web::ServiceConfig) {
|
pub fn services(cfg: &mut actix_web::web::ServiceConfig) {
|
||||||
cfg.service(delete_account);
|
cfg.service(delete_account);
|
||||||
// use crate::define_resource;
|
|
||||||
// use crate::V1_API_ROUTES;
|
|
||||||
//
|
|
||||||
// define_resource!(
|
|
||||||
// cfg,
|
|
||||||
// V1_API_ROUTES.account.delete,
|
|
||||||
// Methods::ProtectPost,
|
|
||||||
// delete_account
|
|
||||||
// );
|
|
||||||
}
|
}
|
||||||
|
@ -85,7 +85,7 @@ pub mod runners {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if payload.login.contains("@") {
|
if payload.login.contains('@') {
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
struct EmailLogin {
|
struct EmailLogin {
|
||||||
name: String,
|
name: String,
|
||||||
|
@ -144,7 +144,7 @@ mod tests {
|
|||||||
assert_eq!(resp.status(), StatusCode::OK);
|
assert_eq!(resp.status(), StatusCode::OK);
|
||||||
|
|
||||||
let health_resp: Health = test::read_body_json(resp).await;
|
let health_resp: Health = test::read_body_json(resp).await;
|
||||||
assert_eq!(health_resp.db, true);
|
assert!(health_resp.db);
|
||||||
assert_eq!(health_resp.redis, Some(true));
|
assert_eq!(health_resp.redis, Some(true));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user