summaryrefslogtreecommitdiffstats
path: root/server/api/clients.js
diff options
context:
space:
mode:
authorUdo Walter2018-08-02 18:13:05 +0200
committerUdo Walter2018-08-02 18:13:05 +0200
commit028c9aaa8651862b2bd495c527d30845d1fb1f50 (patch)
tree2b6bc68432940ebfe7078a8aefad26f369c09f08 /server/api/clients.js
parent[groups] small bugfix (diff)
downloadbas-028c9aaa8651862b2bd495c527d30845d1fb1f50.tar.gz
bas-028c9aaa8651862b2bd495c527d30845d1fb1f50.tar.xz
bas-028c9aaa8651862b2bd495c527d30845d1fb1f50.zip
[groups] add dialog to delete, remove and add groups/clients
Diffstat (limited to 'server/api/clients.js')
-rw-r--r--server/api/clients.js4
1 files changed, 2 insertions, 2 deletions
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 => {