From 7dc57d6c7bdc9f4f54d87d439cedb20ae4037e14 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Sun, 13 Sep 2020 21:13:26 -0400 Subject: [PATCH] fixes --- src/api/routes/Webhook.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/api/routes/Webhook.ts b/src/api/routes/Webhook.ts index 18dc0ea..6827e74 100644 --- a/src/api/routes/Webhook.ts +++ b/src/api/routes/Webhook.ts @@ -36,11 +36,11 @@ export default class Webhook extends Route { if (!req.query?.id) return res.status(400).json({ code: this.constants.codes.CLIENT_ERROR }); const account = await this.server.client.db.Account.findOne({ userID: req.query.id.toString() }).lean().exec(); - if (!account) return res.status(200).send({ error: true }); + if (!account) return res.status(200).send({ found: false }); const moderations = await this.server.client.db.Moderation.find({ userID: req.query.id.toString() }).lean().exec(); const response: { - error: boolean, + found: boolean, tier: number, totalReferrals?: number, createdAt?: Date, @@ -48,7 +48,7 @@ export default class Webhook extends Route { locks?: Date[], deletes?: Date[], } = { - error: false, + found: true, tier: account.tier, totalReferrals: 0, createdAt: account.createdAt,