15 lines
374 B
JavaScript
15 lines
374 B
JavaScript
const express = require('express')
|
|
const router = express.Router()
|
|
|
|
function notifyCashboxRemoval (req, res, next) {
|
|
Promise.resolve()
|
|
.then(() => {
|
|
console.log(`Device ${req.deviceId} had its cashbox removed.`)
|
|
return res.status(200).send({ status: 'OK' })
|
|
})
|
|
.catch(next)
|
|
}
|
|
|
|
router.post('/removal', notifyCashboxRemoval)
|
|
|
|
module.exports = router
|