summaryrefslogtreecommitdiffstats
path: root/server/api/clients.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/api/clients.js')
-rw-r--r--server/api/clients.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/server/api/clients.js b/server/api/clients.js
index a436213..54832eb 100644
--- a/server/api/clients.js
+++ b/server/api/clients.js
@@ -1,6 +1,7 @@
/* global __appdir */
var path = require('path')
var db = require(path.join(__appdir, 'lib', 'sequelize'))
+var io = require(path.join(__appdir, 'lib', 'socketio'))
const backendHelper = require(path.join(__appdir, 'lib', 'external-backends', 'backendhelper'))
// GET Requests
@@ -35,6 +36,7 @@ module.exports.post = {
})
} else {
db.client.create(req.body.info).then(client => {
+ io.in('broadcast newClient').emit('notifications newAlert', { type: 'info', text: 'New client!' })
if (req.body.groupIds) client.setGroups(req.body.groupIds).then(() => { res.send({ id: client.id }) })
})
}