summaryrefslogtreecommitdiffstats
path: root/server/api
diff options
context:
space:
mode:
authorChristian Hofmaier2019-05-06 05:09:29 +0200
committerChristian Hofmaier2019-05-06 05:09:29 +0200
commitac85bec4d5231c21e5bb1e14bebcfafaec45a31f (patch)
tree3228e0ebe72fed313576496103237bfb344d4c26 /server/api
parent[webapp/datatable] fix unnecessary vertical scrollbars (diff)
downloadbas-ac85bec4d5231c21e5bb1e14bebcfafaec45a31f.tar.gz
bas-ac85bec4d5231c21e5bb1e14bebcfafaec45a31f.tar.xz
bas-ac85bec4d5231c21e5bb1e14bebcfafaec45a31f.zip
[eventmanager] fix date/time picker language
Diffstat (limited to 'server/api')
-rw-r--r--server/api/events.js3
1 files changed, 2 insertions, 1 deletions
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 } }))