summaryrefslogtreecommitdiff
path: root/routes.js
diff options
context:
space:
mode:
authorlowercasename <raphaelkabo@gmail.com>2020-01-04 08:05:04 +1100
committerlowercasename <raphaelkabo@gmail.com>2020-01-04 08:05:04 +1100
commit913f3d764547bb36ead71922f6dfac9e83f16c62 (patch)
tree434beda66d2dce0fb811b82204e222a16adbe69a /routes.js
parentdf8d3cd01f8c36ce6721e809e448f727cbf4a857 (diff)
Removal-from-event via password functionality
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)