fix: Unecessary merge of routers

This commit is contained in:
BAaboe 2025-07-22 18:05:19 +02:00
parent 228bc68327
commit 0468d1adca

View file

@ -11,11 +11,8 @@ use crate::{AppState, api::v1::auth::CurrentUser};
mod uuid; mod uuid;
pub fn router(app_state: Arc<AppState>) -> Router<Arc<AppState>> { pub fn router(app_state: Arc<AppState>) -> Router<Arc<AppState>> {
let router_with_auth = Router::new() Router::new()
.route("/{uuid}", get(uuid::get)) .route("/{uuid}", get(uuid::get))
.route("/{uuid}", delete(uuid::delete)) .route("/{uuid}", delete(uuid::delete))
.layer(from_fn_with_state(app_state, CurrentUser::check_auth_layer)); .layer(from_fn_with_state(app_state, CurrentUser::check_auth_layer))
Router::new()
.merge(router_with_auth)
} }