summaryrefslogtreecommitdiffstats
path: root/server/api/clients.js
blob: aeb46733f2af7c952140afa91f174f5800b4caf2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* global __appdir */
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()
    }
  },
  post: function (req, res) {

  }
}