From 319d7ee20045495e5d4fe8733776e0cfc57f425d Mon Sep 17 00:00:00 2001 From: David Huang Date: Sat, 11 Nov 2023 16:58:31 -0600 Subject: [PATCH 1/2] remove tag-related logic for event signup --- pages/api/event/[id].ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pages/api/event/[id].ts b/pages/api/event/[id].ts index cd083b2..c9896d9 100644 --- a/pages/api/event/[id].ts +++ b/pages/api/event/[id].ts @@ -90,11 +90,6 @@ export default async function handler( // TODO: Speed this up! event.volunteers.unshift(user._id); user.events.unshift(event._id); - if (event.program != null) { - if (!user.tags.includes(event.program.tagName)) { - user.tags.unshift(event.program.tagName); - } - } } else if (userIndex === -1 || eventIndex === -1) { throw new Error('Inconsistency between collections!'); } else { From db7de3b64de72a6c48145ad65e3b839dc7aa18b4 Mon Sep 17 00:00:00 2001 From: Zi Nean Teoh Date: Sun, 12 Nov 2023 12:39:51 -0600 Subject: [PATCH 2/2] remove comments that are no longer relevant --- pages/api/event/[id].ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pages/api/event/[id].ts b/pages/api/event/[id].ts index c9896d9..8956b4d 100644 --- a/pages/api/event/[id].ts +++ b/pages/api/event/[id].ts @@ -99,10 +99,6 @@ export default async function handler( // TODO: Speed this up! event.volunteers.splice(userIndex, 1); user.events.splice(eventIndex, 1); - // TODO: Remove the tag for user only if this tag has no relationship - // with other events this user did - // const programIndex = user.tags.indexOf(event.program); - // user.tags.splice(programIndex, 1); } // Resave both document