mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-17 07:05:03 +00:00
Merge branch 'ZeppelinBot:master' into master
This commit is contained in:
commit
158380ad7e
17 changed files with 82 additions and 27 deletions
|
@ -126,7 +126,7 @@ export function initGuildsAPI(app: express.Express) {
|
|||
if (type !== ApiPermissionTypes.User) {
|
||||
return clientError(res, "Invalid type");
|
||||
}
|
||||
if (!isSnowflake(targetId)) {
|
||||
if (!isSnowflake(targetId) || targetId === req.user!.userId) {
|
||||
return clientError(res, "Invalid targetId");
|
||||
}
|
||||
const validPermissions = new Set(Object.values(ApiPermissions));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue