1
0
Fork 0

optional moderation id

refactor/models
Matthew 2019-11-17 00:28:14 -05:00
parent d10156e2c1
commit 466babfe74
No known key found for this signature in database
GPG Key ID: 766BE43AE75F7559
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ export default class Account extends Route {
res.status(200).json({ code: this.constants.codes.SUCCESS, message: acc }); 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 }); const moderations = await this.server.client.db.Moderation.find({ username: req.account.username });
if (!moderations.length) res.sendStatus(204); if (!moderations.length) res.sendStatus(204);
if (req.params.id) { if (req.params.id) {