This commit is contained in:
asyncnomi 2023-01-04 00:11:19 +01:00
parent 655d44e918
commit b5244c8fa6

View file

@ -462,8 +462,8 @@ fastify.post('/sendTreasure', async (request, reply) => {
if ("treasureUid" in content) {
let treasureExists = check(content, "activityUid", ActivityData)
if (treasureExists.success) {
if (treasureData[treasureUid].state != "Pending"
&& treasureData[treasureUid].creator == content.uid) {
if (TreasureData[treasureUid].state != "Pending"
|| TreasureData[treasureUid].creator != content.uid) {
return {
success: false,
why: "You cannot edit already accepted or refused treasure request, or request form other people"