diff --git a/src/api/comm.libraryofcode.org/routes/report.ts b/src/api/comm.libraryofcode.org/routes/report.ts index 818e59a..7cdcabe 100644 --- a/src/api/comm.libraryofcode.org/routes/report.ts +++ b/src/api/comm.libraryofcode.org/routes/report.ts @@ -470,6 +470,8 @@ export default class Report extends Route { const moderations = await this.server.client.db.Moderation.find({ userID: score.userID }); + const historical = await this.server.client.db.ScoreHistorical.find({ userID: score.userID }).lean().exec(); + return res.status(200).json({ name: `${member.username}#${member.discriminator}`, @@ -487,6 +489,7 @@ export default class Report extends Route { totalModerations: moderations?.length > 0 ? moderations.length : 0, inquiries: score.inquiries?.length > 0 ? score.inquiries : [], softInquiries: score.softInquiries?.length > 0 ? score.softInquiries : [], + historical: historical ?? [], lastUpdated: score.lastUpdate, }); } catch (err) {