feat: route to get notified of machine cashbox removal
This commit is contained in:
parent
c396fb18fb
commit
6e2c9b3cbb
1 changed files with 10 additions and 0 deletions
|
|
@ -206,6 +206,15 @@ function stateChange (req, res, next) {
|
||||||
.catch(next)
|
.catch(next)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function notifyCashboxRemoval (req, res, next) {
|
||||||
|
Promise.resolve()
|
||||||
|
.then(() => {
|
||||||
|
logger.log(`Device ${req.deviceId} had its cashbox removed.`)
|
||||||
|
return res.status(200).send({ status: 'OK' })
|
||||||
|
})
|
||||||
|
.catch(next)
|
||||||
|
}
|
||||||
|
|
||||||
function verifyUser (req, res, next) {
|
function verifyUser (req, res, next) {
|
||||||
const pi = plugins(req.settings, req.deviceId)
|
const pi = plugins(req.settings, req.deviceId)
|
||||||
pi.verifyUser(req.body)
|
pi.verifyUser(req.body)
|
||||||
|
|
@ -530,6 +539,7 @@ app.use(filterOldRequests)
|
||||||
app.get('/poll', poll)
|
app.get('/poll', poll)
|
||||||
app.get('/terms_conditions', getTermsConditions)
|
app.get('/terms_conditions', getTermsConditions)
|
||||||
app.post('/state', stateChange)
|
app.post('/state', stateChange)
|
||||||
|
app.post('/cashbox/removal', notifyCashboxRemoval)
|
||||||
|
|
||||||
app.post('/network/heartbeat', networkHeartbeat)
|
app.post('/network/heartbeat', networkHeartbeat)
|
||||||
app.post('/network/performance', networkPerformance)
|
app.post('/network/performance', networkPerformance)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue