feat: add refillUnit route flow

This commit is contained in:
Sérgio Salgado 2023-05-04 18:49:15 +01:00
parent 45f722e724
commit 460a8cf1fd
2 changed files with 44 additions and 3 deletions

View file

@ -13,7 +13,7 @@ const emptyUnitUpdateCounts = (req, res, next) => {
const refillUnitUpdateCounts = (req, res, next) => {
const deviceId = req.deviceId
const newUnits = req.body.newUnits
const { units: newUnits } = req.body
return refillMachineUnits({ deviceId, newUnits: newUnits })
.then(() => res.status(200).send({ status: 'OK' }))