From e69d7c23102dbdc1b9f91a97d9e6db519694d961 Mon Sep 17 00:00:00 2001 From: Udo Walter Date: Sun, 5 Aug 2018 06:48:58 +0000 Subject: [webapp] improved data table with search and pagination; --- server/api/clients.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server/api/clients.js') diff --git a/server/api/clients.js b/server/api/clients.js index 046bced..862a1a2 100644 --- a/server/api/clients.js +++ b/server/api/clients.js @@ -42,7 +42,7 @@ module.exports.post = { db.client.findOne({ where: { id } }).then(client => { if (client) { var promises = [] - if (req.body.info) promises.push([client.update(req.body.info)]) + 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 }) }) } else { res.status(404).end() } -- cgit v1.2.3-55-g7522