mirror of
https://github.com/spacebarchat/server.git
synced 2026-03-30 22:35:40 +00:00
fix bot deleting
This commit is contained in:
@@ -119,12 +119,10 @@ router.post(
|
||||
if (app.owner.id != req.user_id) throw DiscordApiErrors.ACTION_NOT_AUTHORIZED_ON_APPLICATION;
|
||||
|
||||
if (app.owner.totp_secret && (!req.body.code || verifyToken(app.owner.totp_secret, req.body.code))) throw new HTTPError(req.t("auth:login.INVALID_TOTP_CODE"), 60008);
|
||||
|
||||
await Application.delete({ id: app.id });
|
||||
|
||||
if (app.bot) {
|
||||
await User.delete({ id: app.id });
|
||||
}
|
||||
await Application.delete({ id: app.id });
|
||||
|
||||
res.send().status(200);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user