Фильтр эндпоинтов для middleware.

This commit is contained in:
2025-04-16 16:20:32 +04:00
parent 5068fe3069
commit 9cc03c4ffe
2 changed files with 44 additions and 7 deletions

View File

@@ -35,13 +35,15 @@ pub fn get_api_scope<
.service(routes::auth::sign_up_vk);
let users_scope = utoipa_actix_web::scope("/users")
.wrap(JWTAuthorization)
.wrap(JWTAuthorization::default())
.service(routes::users::change_group)
.service(routes::users::change_username)
.service(routes::users::me);
let schedule_scope = utoipa_actix_web::scope("/schedule")
.wrap(JWTAuthorization)
.wrap(JWTAuthorization {
ignore: &["/group-names", "/teacher-names"],
})
.service(routes::schedule::schedule)
.service(routes::schedule::update_download_url)
.service(routes::schedule::cache_status)
@@ -51,7 +53,7 @@ pub fn get_api_scope<
.service(routes::schedule::teacher_names);
let fcm_scope = utoipa_actix_web::scope("/fcm")
.wrap(JWTAuthorization)
.wrap(JWTAuthorization::default())
.service(routes::fcm::update_callback)
.service(routes::fcm::set_token);