feat: ✨ admin routing part 1
This commit is contained in:
parent
f4765630ee
commit
a462d3a82d
11 changed files with 520 additions and 506 deletions
15
src/routing/admin.rs
Normal file
15
src/routing/admin.rs
Normal file
|
@ -0,0 +1,15 @@
|
|||
pub mod role;
|
||||
pub mod user;
|
||||
|
||||
use axum::Router;
|
||||
|
||||
use super::middleware::pass_builder_or_admin_by_authorization_token;
|
||||
|
||||
pub fn route() -> Router {
|
||||
Router::new()
|
||||
.nest("/users", user::route())
|
||||
.nest("/roles", role::route())
|
||||
.route_layer(axum::middleware::from_fn(
|
||||
pass_builder_or_admin_by_authorization_token,
|
||||
))
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue