summary refs log tree commit diff
path: root/src/api
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-12-17 07:52:20 +0100
committerRory& <root@rory.gay>2025-12-17 07:52:20 +0100
commit73397e49a75911b20e72b8bad419f0fa167112fb (patch)
treecc7aa58b7fe88649d6c346a447617c889a20d462 /src/api
parentPrettier 5 (diff)
downloadserver-ts-73397e49a75911b20e72b8bad419f0fa167112fb.tar.xz
Prettier 6
Diffstat (limited to 'src/api')
-rw-r--r--src/api/routes/applications/#application_id/bot/index.ts6
-rw-r--r--src/api/routes/guilds/#guild_id/members/index.ts6
2 files changed, 3 insertions, 9 deletions
diff --git a/src/api/routes/applications/#application_id/bot/index.ts b/src/api/routes/applications/#application_id/bot/index.ts

index e6f1522c..ad491840 100644 --- a/src/api/routes/applications/#application_id/bot/index.ts +++ b/src/api/routes/applications/#application_id/bot/index.ts
@@ -71,11 +71,7 @@ router.post( if (owner.id != req.user_id) throw DiscordApiErrors.ACTION_NOT_AUTHORIZED_ON_APPLICATION; - if ( - owner.totp_secret && - (!req.body.code || verifyToken(owner.totp_secret, req.body.code)) - ) - throw new HTTPError(req.t("auth:login.INVALID_TOTP_CODE"), 60008); + if (owner.totp_secret && (!req.body.code || verifyToken(owner.totp_secret, req.body.code))) throw new HTTPError(req.t("auth:login.INVALID_TOTP_CODE"), 60008); bot.data = { hash: undefined, valid_tokens_since: new Date() }; diff --git a/src/api/routes/guilds/#guild_id/members/index.ts b/src/api/routes/guilds/#guild_id/members/index.ts
index 490d5b5e..a047472c 100644 --- a/src/api/routes/guilds/#guild_id/members/index.ts +++ b/src/api/routes/guilds/#guild_id/members/index.ts
@@ -34,8 +34,7 @@ router.get( query: { limit: { type: "number", - description: - "max number of members to return (1-1000). default 1", + description: "max number of members to return (1-1000). default 1", }, after: { type: "string", @@ -53,8 +52,7 @@ router.get( async (req: Request, res: Response) => { const { guild_id } = req.params; const limit = Number(req.query.limit) || 1; - if (limit > 1000 || limit < 1) - throw new HTTPError("Limit must be between 1 and 1000"); + if (limit > 1000 || limit < 1) throw new HTTPError("Limit must be between 1 and 1000"); const after = `${req.query.after}`; const query = after ? { id: MoreThan(after) } : {};