diff options
author | lowercasename <raphaelkabo@gmail.com> | 2020-01-04 08:05:04 +1100 |
---|---|---|
committer | lowercasename <raphaelkabo@gmail.com> | 2020-01-04 08:05:04 +1100 |
commit | 913f3d764547bb36ead71922f6dfac9e83f16c62 (patch) | |
tree | 434beda66d2dce0fb811b82204e222a16adbe69a /routes.js | |
parent | df8d3cd01f8c36ce6721e809e448f727cbf4a857 (diff) |
Removal-from-event via password functionality
Diffstat (limited to 'routes.js')
-rwxr-xr-x | routes.js | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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) |