From 94b496bf66d6c52ec235124fab31b1bdee3fe5ae Mon Sep 17 00:00:00 2001 From: Braeden57 Date: Tue, 5 Jan 2021 08:46:43 -0800 Subject: [PATCH] Adds custom expiry date to quest --- routes/users.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/routes/users.js b/routes/users.js index 9a73bd1..f265446 100644 --- a/routes/users.js +++ b/routes/users.js @@ -54,7 +54,7 @@ router.get('/edit', (req, res) => res.render('edit')); // Create Quest router.post('/createQuest', (req, res, next) => { - const { title, amount, instructions, campaign} = req.body; + const { title, amount, expiry, instructions, campaign} = req.body; let errors = []; @@ -77,6 +77,7 @@ router.post('/createQuest', (req, res, next) => { const newQuest = new Quest({ title: title, campaign: campaign, + expiry: expiry, xp: amount, instruction: instructions });