wip/kick #36
1 changed files with 1 additions and 1 deletions
|
@ -20,6 +20,7 @@ pub fn router(app_state: Arc<AppState>) -> Router<Arc<AppState>> {
|
|||
.nest("/users", users::router())
|
||||
.nest("/guilds", guilds::router())
|
||||
.nest("/invites", invites::router())
|
||||
.nest("/members", members::router())
|
||||
.nest("/me", me::router())
|
||||
.layer(from_fn_with_state(
|
||||
app_state.clone(),
|
||||
|
@ -30,6 +31,5 @@ pub fn router(app_state: Arc<AppState>) -> Router<Arc<AppState>> {
|
|||
.route("/stats", get(stats::res))
|
||||
.nest("/auth", auth::router(app_state.clone()))
|
||||
.nest("/channels", channels::router(app_state))
|
||||
radical marked this conversation as resolved
Outdated
|
||||
.nest("/members", members::router())
|
||||
.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