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)
|
||||
}
|
||||
|
||||
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) {
|
||||
const pi = plugins(req.settings, req.deviceId)
|
||||
pi.verifyUser(req.body)
|
||||
|
|
@ -530,6 +539,7 @@ app.use(filterOldRequests)
|
|||
app.get('/poll', poll)
|
||||
app.get('/terms_conditions', getTermsConditions)
|
||||
app.post('/state', stateChange)
|
||||
app.post('/cashbox/removal', notifyCashboxRemoval)
|
||||
|
||||
app.post('/network/heartbeat', networkHeartbeat)
|
||||
app.post('/network/performance', networkPerformance)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue