From 466babfe7470c6b4fa5c7683a289c398b0919a23 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Sun, 17 Nov 2019 00:28:14 -0500 Subject: [PATCH] optional moderation id --- src/api/routes/Account.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/routes/Account.ts b/src/api/routes/Account.ts index 830edbb..284f3d4 100644 --- a/src/api/routes/Account.ts +++ b/src/api/routes/Account.ts @@ -29,7 +29,7 @@ export default class Account extends Route { res.status(200).json({ code: this.constants.codes.SUCCESS, message: acc }); }); - this.router.get('/moderations/:id', async (req: Req, res) => { + this.router.get('/moderations/:id?', async (req: Req, res) => { const moderations = await this.server.client.db.Moderation.find({ username: req.account.username }); if (!moderations.length) res.sendStatus(204); if (req.params.id) {