summaryrefslogtreecommitdiff
path: root/routes.js
diff options
context:
space:
mode:
Diffstat (limited to 'routes.js')
-rwxr-xr-xroutes.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/routes.js b/routes.js
index f2bca02..30a96f5 100755
--- a/routes.js
+++ b/routes.js
@@ -989,7 +989,8 @@ router.post('/attendevent/:eventID', (req, res) => {
const newAttendee = {
name: req.body.attendeeName,
status: 'attending',
- email: req.body.attendeeEmail
+ email: req.body.attendeeEmail,
+ removalPassword: req.body.removeAttendancePassword
};
Event.findOne({
@@ -1029,7 +1030,7 @@ router.post('/attendevent/:eventID', (req, res) => {
router.post('/unattendevent/:eventID', (req, res) => {
Event.update(
{ id: req.params.eventID },
- { $pull: { attendees: { email: req.body.attendeeEmail } } }
+ { $pull: { attendees: { removalPassword: req.body.removeAttendancePassword } } }
)
.then(response => {
console.log(response)