From ac85bec4d5231c21e5bb1e14bebcfafaec45a31f Mon Sep 17 00:00:00 2001 From: Christian Hofmaier Date: Mon, 6 May 2019 03:09:29 +0000 Subject: [eventmanager] fix date/time picker language --- server/api/events.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'server/api') diff --git a/server/api/events.js b/server/api/events.js index 47ab94b..6ec37c4 100644 --- a/server/api/events.js +++ b/server/api/events.js @@ -35,6 +35,7 @@ router.getAsync('', async (req, res) => { /* * @return: Returns a list of all childs of the given groups + * Is also used by the PermissionManager Frontend to get it's blacklist childs */ router.postAsync('/blacklist', async (req, res) => { if (req.body.groups) { @@ -72,7 +73,7 @@ router.postAsync(['', '/:id'], async (req, res) => { } else { res.status(404).end() } - } else { + } else if (req.params.id === undefined) { // Create new role eventDb = await db.event.create({ name: req.body.name, description: req.body.description, times: req.body.times, important: req.body.important, wakeonlan: req.body.wakeonlan, configId: req.body.config || null }) promises.push(eventDb.setGroups(req.body.groups, { through: { blacklist: 0 } })) -- cgit v1.2.3-55-g7522