wip/kick #36
1 changed files with 2 additions and 5 deletions
|
@ -11,11 +11,8 @@ use crate::{AppState, api::v1::auth::CurrentUser};
|
|||
mod uuid;
|
||||
|
||||
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}", delete(uuid::delete))
|
||||
.layer(from_fn_with_state(app_state, CurrentUser::check_auth_layer));
|
||||
|
||||
Router::new()
|
||||
.merge(router_with_auth)
|
||||
.layer(from_fn_with_state(app_state, CurrentUser::check_auth_layer))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue