LAST COMMIT AS FAR AS I'M CONCERNED
This commit is contained in:
parent
3d12c9e573
commit
c960f961ce
1 changed files with 2 additions and 4 deletions
6
index.js
6
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] = {
|
||||
|
|
Loading…
Reference in a new issue