From 8e387259c5406f5c1aab133abc5e28d2c8130184 Mon Sep 17 00:00:00 2001 From: lesion Date: Thu, 4 Jul 2019 00:29:50 +0200 Subject: [PATCH] fix confirm/unconfirm event --- server/api/controller/event.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/api/controller/event.js b/server/api/controller/event.js index 6cd517ab..ece08695 100644 --- a/server/api/controller/event.js +++ b/server/api/controller/event.js @@ -104,7 +104,7 @@ const eventController = { }, async confirm(req, res) { - const id = req.params.event_id + const id = Number(req.params.event_id) const event = await Event.findByPk(id) try { @@ -119,7 +119,7 @@ const eventController = { }, async unconfirm(req, res) { - const id = req.params.event_id + const id = Number(req.params.event_id) const event = await Event.findByPk(id) try {