From 028c9aaa8651862b2bd495c527d30845d1fb1f50 Mon Sep 17 00:00:00 2001 From: Udo Walter Date: Thu, 2 Aug 2018 16:13:05 +0000 Subject: [groups] add dialog to delete, remove and add groups/clients --- server/api/clients.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/api/clients.js') diff --git a/server/api/clients.js b/server/api/clients.js index ef0dcaa..4f7ce1d 100644 --- a/server/api/clients.js +++ b/server/api/clients.js @@ -38,11 +38,11 @@ module.exports.post = { save: function (req, res) { const id = req.body.id > 0 ? req.body.id : null if (id) { - db.client.findOne({ where: { id: id } }).then(client => { + db.client.findOne({ where: { id } }).then(client => { var promises = [] if (req.body.info) promises.push([client.update(req.body.info)]) if (req.body.groupIds) promises.push(client.setGroups(req.body.groupIds)) - Promise.all(promises).then(() => { res.send({id}) }) + Promise.all(promises).then(() => { res.send({ id }) }) }) } else { db.client.create(req.body.info).then(client => { -- cgit v1.2.3-55-g7522