mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-03-12 23:20:25 +08:00
not allowing banned users to link accounts
This commit is contained in:
parent
4aaa8dbb21
commit
05626fda06
1 changed files with 3 additions and 0 deletions
|
@ -141,6 +141,9 @@ class UserController {
|
|||
"This Discord account is already linked to a different account"
|
||||
);
|
||||
}
|
||||
if (user.banned === true) {
|
||||
throw new MonkeyError(403, "Banned accounts cannot link with Discord");
|
||||
}
|
||||
await UsersDAO.linkDiscord(uid, did);
|
||||
await BotDAO.linkDiscord(uid, did);
|
||||
return res.status(200).json({
|
||||
|
|
Loading…
Reference in a new issue