lamassu-server/lib/routes/stateRoutes.js
Cesar 558317e9f3 Feat: implement per operator settings cache
Fix: fix linter-found issues

Chore: move findOperatorId to own middleware file

Chore: delete old routes.js file and rename new-routes.js to routes.js

Fix: PR fixes
2021-03-19 14:04:31 +00:00

14 lines
332 B
JavaScript

const express = require('express')
const router = express.Router()
const helpers = require('../route-helpers')
function stateChange (req, res, next) {
helpers.stateChange(req.deviceId, req.deviceTime, req.body)
.then(() => res.status(200).json({}))
.catch(next)
}
router.post('/', stateChange)
module.exports = router