summary refs log tree commit diff
diff options
context:
space:
mode:
authorMathMan05 <mathmanrm@gmail.com>2025-11-24 12:10:18 -0600
committerRory& <root@rory.gay>2025-11-24 19:24:14 +0100
commit7cc6ce062806cf04c54db30f8dcf34d0240ec257 (patch)
tree02f5e890109cb6e49a4b9967b32b728425faa06c
parentfix :3 (diff)
downloadserver-ts-7cc6ce062806cf04c54db30f8dcf34d0240ec257.tar.xz
fix bot deleting
-rw-r--r--src/api/routes/applications/#application_id/index.ts4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/api/routes/applications/#application_id/index.ts b/src/api/routes/applications/#application_id/index.ts

index f7d741cc..c38895d2 100644 --- a/src/api/routes/applications/#application_id/index.ts +++ b/src/api/routes/applications/#application_id/index.ts
@@ -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); },