feat: add failedqrscans route
This commit is contained in:
parent
60b016efb4
commit
79fc7f3c44
3 changed files with 26 additions and 4 deletions
14
lib/routes/failedQRScans.js
Normal file
14
lib/routes/failedQRScans.js
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
const express = require('express')
|
||||
const router = express.Router()
|
||||
|
||||
const { updateFailedQRScans } = require('../machine-loader')
|
||||
|
||||
function failedQRScans (req, res, next) {
|
||||
return updateFailedQRScans(req.deviceId, req.body)
|
||||
.then(() => res.status(200).send({ status: 'OK' }))
|
||||
.catch(next)
|
||||
}
|
||||
|
||||
router.post('/', failedQRScans)
|
||||
|
||||
module.exports = router
|
||||
Loading…
Add table
Add a link
Reference in a new issue