mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-25 11:43:07 +01:00
prevent put /guilds/id/members/id for others until we have oauth2 scopes impled
This commit is contained in:
parent
8a7ee8c8a9
commit
3498ffdc01
@ -18,6 +18,7 @@
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import {
|
||||
DiscordApiErrors,
|
||||
emitEvent,
|
||||
Emoji,
|
||||
getPermission,
|
||||
@ -198,7 +199,9 @@ router.put(
|
||||
member_id = req.user_id;
|
||||
rights.hasThrow("JOIN_GUILDS");
|
||||
} else {
|
||||
// TODO: join others by controller
|
||||
// TODO: check oauth2 scope
|
||||
|
||||
throw DiscordApiErrors.MISSING_REQUIRED_OAUTH2_SCOPE;
|
||||
}
|
||||
|
||||
const guild = await Guild.findOneOrFail({
|
||||
|
Loading…
Reference in New Issue
Block a user