From c960f961ce8389ca4f8ec02a678725275fb677e0 Mon Sep 17 00:00:00 2001 From: asyncnomi Date: Wed, 4 Jan 2023 00:43:59 +0100 Subject: [PATCH] LAST COMMIT AS FAR AS I'M CONCERNED --- index.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index daa1af7..9c3bf9f 100644 --- a/index.js +++ b/index.js @@ -318,7 +318,7 @@ fastify.post('/get', async (request, reply) => { case "treasure": let treasureData = JSON.parse(JSON.stringify(TreasureData)); for (treasure in treasureData) { - treasureData[treasure].activity = ActivityData[treasureData[treasure].activity]; + treasureData[treasure].activity = ActivityData[treasureData[treasure].activityUid]; } if (AdminUsersUid.includes(content.uid)) { return { @@ -493,7 +493,7 @@ fastify.post('/sendTreasure', async (request, reply) => { creator: content.uid, image: imageUid, desc: content.desc, - activity: content.activityUid, + activityUid: content.activityUid, state: "Pending" } saveData(treasurePath, TreasureData); @@ -558,8 +558,6 @@ fastify.post('/acceptTreasure', async (request, reply) => { if (treasureExists.success) { TreasureData[content.treasureUid].state = "Accepted"; saveData(treasurePath, TreasureData); - console.log(TreasureData[content.treasureUid]) - console.log(ActivityData[TreasureData[content.treasureUid].activityUid]) ActivityData[TreasureData[content.treasureUid].activityUid].treasureState = "Accepted"; saveData(activityPath, ActivityData); GoldenUsers[TreasureData[content.treasureUid].activityUid] = {