Skip to content

Commit

Permalink
Merge pull request #63 from ChangePlusPlusVandy/fix-event-sign-up
Browse files Browse the repository at this point in the history
remove tag-related logic for event signup
  • Loading branch information
zineanteoh authored Nov 12, 2023
2 parents 2a77b40 + db7de3b commit 46c4b17
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions pages/api/event/[id].ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -104,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
Expand Down

1 comment on commit 46c4b17

@vercel
Copy link

@vercel vercel bot commented on 46c4b17 Nov 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

bookem-user – ./

bookem-user-bookem.vercel.app
bookem-user-git-main-bookem.vercel.app
bookem-user-old.vercel.app

Please sign in to comment.