Chore: merge compliance notification code changes
This commit is contained in:
parent
fc39d9b1a3
commit
757db75d1a
7 changed files with 36 additions and 21 deletions
|
|
@ -2,10 +2,11 @@ const express = require('express')
|
|||
const router = express.Router()
|
||||
|
||||
const helpers = require('../route-helpers')
|
||||
const respond = require('../respond')
|
||||
|
||||
function stateChange (req, res, next) {
|
||||
helpers.stateChange(req.deviceId, req.deviceTime, req.body)
|
||||
.then(() => res.status(200).json({}))
|
||||
.then(() => respond(req, res))
|
||||
.catch(next)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue