Initial commit

This commit is contained in:
Arnaud Nelissen
2021-07-16 10:18:13 +02:00
commit 3af7ddab06
5894 changed files with 590836 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
const services = require('../services')
const { firmware } = services
const postLookFirmware = async (req, res, next) => {
const { serialNumber, hash, version, type, hardwareIndex, hardwareVersion } = req.body
try {
const obj = await firmware.lookFirmware(serialNumber, hash, version, type, hardwareIndex, hardwareVersion)
res.send(obj)
} catch (e) {
console.log(e.message)
res.sendStatus(500)
}
}
const postSyncFirmware = async (req, res, next) => {
const { serialNumber, hash, version, type, hardwareIndex, hardwareVersion } = req.body
try {
const obj = await firmware.syncFirmware(serialNumber, hash, version, type, hardwareIndex, hardwareVersion)
res.send(obj)
} catch (e) {
console.log(e.message)
res.sendStatus(500)
}
}
module.exports = {
postLookFirmware,
postSyncFirmware
}