changes to report

master
Matthew 2021-11-28 15:50:10 -05:00
parent 4c012c9518
commit 5a7c3d7fdb
No known key found for this signature in database
GPG Key ID: 210AF32ADE3B5C4B
1 changed files with 1 additions and 1 deletions

View File

@ -217,7 +217,7 @@ export default class Report extends Route {
const merchant = await this.server.client.db.Merchant.findOne({ key: req.headers.authorization }).lean().exec();
if (!merchant) return res.status(401).json({ code: this.constants.codes.UNAUTHORIZED, message: this.constants.messages.UNAUTHORIZED });
const report = await this.server.client.db.Score.findOne({ userID: req.body.userID }).lean().exec();
const report = await this.server.client.db.Score.findOne({ userID: req.body.userID, 'pin.2': req.body.pin }).lean().exec();
if (!report) return res.status(401).json({ code: this.constants.codes.UNAUTHORIZED, message: this.constants.messages.UNAUTHORIZED });
let totalScore: number;