From 082876e37787922ef2e0feaed8011fde4d914b77 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Sun, 13 Sep 2020 20:56:37 -0400 Subject: [PATCH] fixes to auth --- src/api/routes/Webhook.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/routes/Webhook.ts b/src/api/routes/Webhook.ts index a0e1766..18dc0ea 100644 --- a/src/api/routes/Webhook.ts +++ b/src/api/routes/Webhook.ts @@ -32,7 +32,7 @@ export default class Webhook extends Route { this.router.get('/score', async (req, res) => { try { - if (req.query?.authorization !== this.server.security.keys.iv.toString('hex')) return res.status(401).json({ code: this.constants.codes.UNAUTHORIZED, message: this.constants.messages.UNAUTHORIZED }); + if (req.query?.authorization !== this.server.security.keys.internal.toString('hex')) return res.status(401).json({ code: this.constants.codes.UNAUTHORIZED, message: this.constants.messages.UNAUTHORIZED }); 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();