feat: migrate v1 api mod to use actix_auth_middleware

This commit is contained in:
realaravinth
2022-05-07 12:29:37 +05:30
parent b057e48d72
commit a668fafa62
17 changed files with 65 additions and 19 deletions

View File

@@ -31,7 +31,7 @@ pub struct Secret {
#[my_codegen::get(
path = "crate::V1_API_ROUTES.account.get_secret",
wrap = "crate::CheckLogin"
wrap = "crate::api::v1::get_middleware()"
)]
async fn get_secret(id: Identity, data: AppData) -> ServiceResult<impl Responder> {
let username = id.identity().unwrap();
@@ -49,7 +49,7 @@ async fn get_secret(id: Identity, data: AppData) -> ServiceResult<impl Responder
#[my_codegen::post(
path = "crate::V1_API_ROUTES.account.update_secret",
wrap = "crate::CheckLogin"
wrap = "crate::api::v1::get_middleware()"
)]
async fn update_user_secret(
id: Identity,