feat: add failedqrscans route

This commit is contained in:
siiky 2024-06-14 00:28:41 +01:00
parent 60b016efb4
commit 79fc7f3c44
3 changed files with 26 additions and 4 deletions

View 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