wip/kick #36
1 changed files with 2 additions and 2 deletions
|
@ -13,7 +13,7 @@ mod invites;
|
||||||
mod me;
|
mod me;
|
||||||
mod stats;
|
mod stats;
|
||||||
mod users;
|
mod users;
|
||||||
mod members;
|
mod member;
|
||||||
|
|
||||||
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()
|
let router_with_auth = Router::new()
|
||||||
|
@ -30,6 +30,6 @@ pub fn router(app_state: Arc<AppState>) -> Router<Arc<AppState>> {
|
||||||
.route("/stats", get(stats::res))
|
.route("/stats", get(stats::res))
|
||||||
.nest("/auth", auth::router(app_state.clone()))
|
.nest("/auth", auth::router(app_state.clone()))
|
||||||
.nest("/channels", channels::router(app_state.clone()))
|
.nest("/channels", channels::router(app_state.clone()))
|
||||||
.nest("/members", members::router(app_state))
|
.nest("/member", member::router(app_state))
|
||||||
radical marked this conversation as resolved
Outdated
|
|||||||
.merge(router_with_auth)
|
.merge(router_with_auth)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue
this should be moved to the router_with_auth instead as all endpoints inside /members needs auth, also it should be
/members
plural and not/member
singular. This also goes for the folder/module namewhy plural, we are only accessing a single member
@baaboe wrote in #36 (comment):
Because it’s accessing a singular resource from the
members
resource collection. It’s a REST API thing./members
contains all members, even though you're only accessing one, think of it like a folder tree with /members containing all of the members of every guild out there but you only have access to a subset of them