wip/kick #36
3 changed files with 4 additions and 5 deletions
|
@ -10,9 +10,8 @@ use crate::{AppState, api::v1::auth::CurrentUser};
|
|||
|
||||
mod uuid;
|
||||
|
||||
pub fn router(app_state: Arc<AppState>) -> Router<Arc<AppState>> {
|
||||
pub fn router() -> Router<Arc<AppState>> {
|
||||
Router::new()
|
||||
.route("/{uuid}", get(uuid::get))
|
||||
.route("/{uuid}", delete(uuid::delete))
|
||||
.layer(from_fn_with_state(app_state, CurrentUser::check_auth_layer))
|
||||
}
|
|
@ -13,7 +13,7 @@ mod invites;
|
|||
mod me;
|
||||
mod stats;
|
||||
mod users;
|
||||
mod member;
|
||||
mod members;
|
||||
|
||||
pub fn router(app_state: Arc<AppState>) -> Router<Arc<AppState>> {
|
||||
let router_with_auth = Router::new()
|
||||
|
@ -29,7 +29,7 @@ pub fn router(app_state: Arc<AppState>) -> Router<Arc<AppState>> {
|
|||
Router::new()
|
||||
.route("/stats", get(stats::res))
|
||||
.nest("/auth", auth::router(app_state.clone()))
|
||||
.nest("/channels", channels::router(app_state.clone()))
|
||||
.nest("/member", member::router(app_state))
|
||||
.nest("/channels", channels::router(app_state))
|
||||
.nest("/members", members::router())
|
||||
.merge(router_with_auth)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue