From a65c45e5962b6cddf2f6dbf2cb7366b389418b19 Mon Sep 17 00:00:00 2001 From: Udo Walter Date: Thu, 2 Aug 2018 00:45:41 +0000 Subject: [groups] add ability to show all groups and clients --- server/api/clients.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'server/api/clients.js') 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 => { -- cgit v1.2.3-55-g7522