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.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/server/api/clients.js b/server/api/clients.js
index 1f28c0b..2780bd6 100644
--- a/server/api/clients.js
+++ b/server/api/clients.js
@@ -10,6 +10,13 @@ module.exports.get = {
})
},
+ // get all groups
+ getAll: function (req, res) {
+ db.client.findAll().then(list => {
+ res.send(list)
+ })
+ },
+
// get all clients that have no groups
getTopLevel: function (req, res) {
db.client.findAll({ where: { '$groups.id$': null }, include: ['groups'] }).then(clients => {