lamassu-server/lib/routes/stateRoutes.js
Cesar 85235eaa13 Feat: refactor routes.js express entrypoint config
Feat: express config script refactor

Feat: add state and settingsCache files
2021-03-19 14:04:31 +00:00

14 lines
No EOL
331 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