diff --git a/lib/routes.js b/lib/routes.js index 96dacf02..87591093 100644 --- a/lib/routes.js +++ b/lib/routes.js @@ -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)