Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove tag-related logic for event signup #63

Merged
merged 2 commits into from
Nov 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading