1
0
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:
Madeline 2023-08-27 16:54:54 +10:00
parent 8a7ee8c8a9
commit 3498ffdc01
No known key found for this signature in database
GPG Key ID: 1958E017C36F2E47

View File

@ -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({