summaryrefslogtreecommitdiffstats
path: root/server/api/clients.js
diff options
context:
space:
mode:
authorUdo Walter2018-07-30 01:31:08 +0200
committerUdo Walter2018-07-30 01:31:08 +0200
commitf6cadb25e42e6568098f2962fa9b302cfbf074c5 (patch)
tree4dd205c43603b22d00b2b51a162922643014e436 /server/api/clients.js
parent[store/global] simplified settings loading (diff)
downloadbas-f6cadb25e42e6568098f2962fa9b302cfbf074c5.tar.gz
bas-f6cadb25e42e6568098f2962fa9b302cfbf074c5.tar.xz
bas-f6cadb25e42e6568098f2962fa9b302cfbf074c5.zip
[server/router] changed api routing from query keyword to url parameter for group and client api (todo: the rest)
Diffstat (limited to 'server/api/clients.js')
-rw-r--r--server/api/clients.js18
1 files changed, 8 insertions, 10 deletions
diff --git a/server/api/clients.js b/server/api/clients.js
index aeb4673..37e207b 100644
--- a/server/api/clients.js
+++ b/server/api/clients.js
@@ -3,18 +3,16 @@ var path = require('path')
var db = require(path.join(__appdir, 'lib', 'sequelize'))
module.exports = {
- get: function (req, res) {
- switch (req.query.action) {
- case 'getInfo':
- db.client.findOne({ where: { id: req.query.id }}).then(client => {
- res.send(client)
- })
- break
- default:
- res.end()
+ get: {
+
+ getInfo: function (req, res) {
+ db.client.findOne({ where: { id: req.query.id } }).then(client => {
+ res.send(client)
+ })
}
+
},
- post: function (req, res) {
+ post: {
}
}