Ajout gestion Look & Sync firmwares, et routes BST
This commit is contained in:
278
controllers/api.controller.js
Normal file
278
controllers/api.controller.js
Normal file
@@ -0,0 +1,278 @@
|
||||
const services = require('../services')
|
||||
|
||||
const { device } = services
|
||||
|
||||
const getPrograms = async (req, res, next) => {
|
||||
///// Emit event to server
|
||||
try {
|
||||
const programs = await device.getPrograms(req.params.msn);
|
||||
res.send(programs);
|
||||
} catch (error) {
|
||||
res.status(500).send({message: error.message || "unknown_error"});
|
||||
}
|
||||
}
|
||||
|
||||
const postPrograms = async (req, res, next) => {
|
||||
///// Emit event to server
|
||||
try {
|
||||
const programs = await device.postPrograms(req.params.msn, req.body.programs, req.body.timestamp);
|
||||
res.send(programs);
|
||||
} catch (error) {
|
||||
res.status(500).send({message: error.message || "unknown_error"});
|
||||
}
|
||||
}
|
||||
|
||||
const putPrograms = async (req, res, next) => {
|
||||
try {
|
||||
var programs = await device.postPrograms(req.params.msn, req.body.programs, req.body.timestamp);
|
||||
res.send(programs);
|
||||
} catch (error) {
|
||||
res.status(500).send({message: error.message || "unknown_error"});
|
||||
}
|
||||
}
|
||||
|
||||
const deletePrograms = async (req, res, next) => {
|
||||
///// Emit event to server
|
||||
try {
|
||||
const programs = await device.postPrograms(req.params.msn, [], req.body.timestamp);
|
||||
res.send(programs);
|
||||
} catch (error) {
|
||||
res.status(500).send({message: error.message || "unknown_error"});
|
||||
}
|
||||
}
|
||||
|
||||
const getConfiguration = async (req, res, next) => {
|
||||
///// Emit event to server
|
||||
try {
|
||||
const configuration = await device.getConfiguration(req.params.msn);
|
||||
res.send(configuration);
|
||||
} catch (error) {
|
||||
res.status(500).send({message: error.message || "unknown_error"});
|
||||
}
|
||||
}
|
||||
|
||||
const postConfiguration = async (req, res, next) => {
|
||||
///// Emit event to server
|
||||
try {
|
||||
const configuration = await device.postConfiguration(req.params.msn, req.body.configuration, req.body.timestamp);
|
||||
res.send(configuration);
|
||||
} catch (error) {
|
||||
res.status(500).send({message: error.message || "unknown_error"});
|
||||
}
|
||||
}
|
||||
|
||||
const putConfiguration = async (req, res, next) => {
|
||||
try {
|
||||
var configuration = await device.postConfiguration(req.params.msn, req.body.configuration, req.body.timestamp);
|
||||
res.send(configuration);
|
||||
} catch (error) {
|
||||
res.status(500).send({message: error.message || "unknown_error"});
|
||||
}
|
||||
}
|
||||
|
||||
const deleteConfiguration = async (req, res, next) => {
|
||||
///// Emit event to server
|
||||
try {
|
||||
const configuration = await device.postConfiguration(req.params.msn, [], req.body.timestamp);
|
||||
res.send(configuration);
|
||||
} catch (error) {
|
||||
res.status(500).send({message: error.message || "unknown_error"});
|
||||
}
|
||||
}
|
||||
|
||||
const getSlots = async (req, res, next) => {
|
||||
///// Emit event to server
|
||||
try {
|
||||
const slots = await device.getSlots(req.params.msn);
|
||||
res.send(slots);
|
||||
} catch (error) {
|
||||
res.status(500).send({message: error.message || "unknown_error"});
|
||||
}
|
||||
}
|
||||
|
||||
const postSlots = async (req, res, next) => {
|
||||
///// Emit event to server
|
||||
try {
|
||||
const slots = await device.postSlots(req.params.msn, req.body.slots, req.body.timestamp);
|
||||
res.send(slots);
|
||||
} catch (error) {
|
||||
res.status(500).send({message: error.message || "unknown_error"});
|
||||
}
|
||||
}
|
||||
|
||||
const putSlots = async (req, res, next) => {
|
||||
try {
|
||||
var slots = await device.postSlots(req.params.msn, req.body.slots, req.body.timestamp);
|
||||
res.send(slots);
|
||||
} catch (error) {
|
||||
res.status(500).send({message: error.message || "unknown_error"});
|
||||
}
|
||||
}
|
||||
|
||||
const deleteSlots = async (req, res, next) => {
|
||||
///// Emit event to server
|
||||
try {
|
||||
const slots = await device.postSlots(req.params.msn, [], req.body.timestamp);
|
||||
res.send(slots);
|
||||
} catch (error) {
|
||||
res.status(500).send({message: error.message || "unknown_error"});
|
||||
}
|
||||
}
|
||||
|
||||
const getManualCommand = async (req, res, next) => {
|
||||
///// Emit event to server
|
||||
try {
|
||||
const manualCommand = await device.getManualCommand(req.params.msn);
|
||||
res.send(manualCommand);
|
||||
} catch (error) {
|
||||
res.status(500).send({message: error.message || "unknown_error"});
|
||||
}
|
||||
}
|
||||
|
||||
const postManualCommand = async (req, res, next) => {
|
||||
///// Emit event to server
|
||||
try {
|
||||
const manualCommand = await device.postManualCommand(req.params.msn, req.body.manualCommand);
|
||||
res.send(manualCommand);
|
||||
} catch (error) {
|
||||
res.status(500).send({message: error.message || "unknown_error"});
|
||||
}
|
||||
}
|
||||
|
||||
const putManualCommand = async (req, res, next) => {
|
||||
try {
|
||||
var manualCommand = await device.postManualCommand(req.params.msn, req.body.manualCommand);
|
||||
res.send(manualCommand);
|
||||
} catch (error) {
|
||||
res.status(500).send({message: error.message || "unknown_error"});
|
||||
}
|
||||
}
|
||||
|
||||
const deleteManualCommand = async (req, res, next) => {
|
||||
///// Emit event to server
|
||||
try {
|
||||
const manualCommand = await device.postManualCommand(req.params.msn, null);
|
||||
res.send(manualCommand);
|
||||
} catch (error) {
|
||||
res.status(500).send({message: error.message || "unknown_error"});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const getStatusCommand = async (req, res, next) => {
|
||||
///// Emit event to server
|
||||
try {
|
||||
const statusCommand = await device.getStatusCommand(req.params.msn);
|
||||
res.send(statusCommand);
|
||||
} catch (error) {
|
||||
res.status(500).send({message: error.message || "unknown_error"});
|
||||
}
|
||||
}
|
||||
|
||||
const postStatusCommand = async (req, res, next) => {
|
||||
///// Emit event to server
|
||||
try {
|
||||
const statusCommand = await device.postStatusCommand(req.params.msn, req.body.statusCommand);
|
||||
res.send(statusCommand);
|
||||
} catch (error) {
|
||||
res.status(500).send({message: error.message || "unknown_error"});
|
||||
}
|
||||
}
|
||||
|
||||
const putStatusCommand = async (req, res, next) => {
|
||||
try {
|
||||
var statusCommand = await device.postStatusCommand(req.params.msn, req.body.statusCommand);
|
||||
res.send(statusCommand);
|
||||
} catch (error) {
|
||||
res.status(500).send({message: error.message || "unknown_error"});
|
||||
}
|
||||
}
|
||||
|
||||
const deleteStatusCommand = async (req, res, next) => {
|
||||
///// Emit event to server
|
||||
try {
|
||||
const statusCommand = await device.postStatusCommand(req.params.msn, null);
|
||||
res.send(statusCommand);
|
||||
} catch (error) {
|
||||
res.status(500).send({message: error.message || "unknown_error"});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const getAcknowledgedAlerts = async (req, res, next) => {
|
||||
///// Emit event to server
|
||||
try {
|
||||
const acknowledgedAlerts = await device.getAcknowledgedAlerts(req.params.msn);
|
||||
res.send(acknowledgedAlerts);
|
||||
} catch (error) {
|
||||
res.status(500).send({message: error.message || "unknown_error"});
|
||||
}
|
||||
}
|
||||
|
||||
const postAcknowledgedAlerts = async (req, res, next) => {
|
||||
///// Emit event to server
|
||||
try {
|
||||
const acknowledgedAlerts = await device.postAcknowledgedAlerts(req.params.msn, req.body.acknowledgedAlerts);
|
||||
res.send(acknowledgedAlerts);
|
||||
} catch (error) {
|
||||
res.status(500).send({message: error.message || "unknown_error"});
|
||||
}
|
||||
}
|
||||
|
||||
const putAcknowledgedAlerts = async (req, res, next) => {
|
||||
try {
|
||||
var acknowledgedAlerts = await device.postAcknowledgedAlerts(req.params.msn, req.body.acknowledgedAlerts);
|
||||
res.send(acknowledgedAlerts);
|
||||
} catch (error) {
|
||||
res.status(500).send({message: error.message || "unknown_error"});
|
||||
}
|
||||
}
|
||||
|
||||
const deleteAcknowledgedAlerts = async (req, res, next) => {
|
||||
///// Emit event to server
|
||||
try {
|
||||
const acknowledgedAlerts = await device.postAcknowledgedAlerts(req.params.msn, null);
|
||||
res.send(acknowledged);
|
||||
} catch (error) {
|
||||
res.status(500).send({message: error.message || "unknown_error"});
|
||||
}
|
||||
}
|
||||
|
||||
const ping = async (req, res, next) => {
|
||||
///// Emit event to server
|
||||
res.sendStatus(200);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
getPrograms,
|
||||
postPrograms,
|
||||
putPrograms,
|
||||
deletePrograms,
|
||||
|
||||
getConfiguration,
|
||||
postConfiguration,
|
||||
putConfiguration,
|
||||
deleteConfiguration,
|
||||
|
||||
getSlots,
|
||||
postSlots,
|
||||
putSlots,
|
||||
deleteSlots,
|
||||
|
||||
getManualCommand,
|
||||
postManualCommand,
|
||||
putManualCommand,
|
||||
deleteManualCommand,
|
||||
|
||||
getStatusCommand,
|
||||
postStatusCommand,
|
||||
putStatusCommand,
|
||||
deleteStatusCommand,
|
||||
|
||||
getAcknowledgedAlerts,
|
||||
postAcknowledgedAlerts,
|
||||
putAcknowledgedAlerts,
|
||||
deleteAcknowledgedAlerts,
|
||||
|
||||
ping,
|
||||
}
|
||||
@@ -3,10 +3,15 @@ const services = require('../services')
|
||||
const { firmware } = services
|
||||
|
||||
const postLookFirmware = async (req, res, next) => {
|
||||
const { serialNumber, hash, version, type, hardwareIndex, hardwareVersion } = req.body
|
||||
const { serialNumber, firmwareHash, firmwareVersion, moduleType, hardwareIndex, hardwareVersion } = req.body
|
||||
try {
|
||||
const obj = await firmware.lookFirmware(serialNumber, hash, version, type, hardwareIndex, hardwareVersion)
|
||||
res.send(obj)
|
||||
const obj = await firmware.lookFirmware(serialNumber, firmwareHash, firmwareVersion, moduleType, hardwareIndex, hardwareVersion)
|
||||
|
||||
if (!obj) { res.sendStatus(200); }
|
||||
else { res.send({
|
||||
firmwareHash: obj.firmwareHash,
|
||||
firmwareSize: obj.firmwareSize,
|
||||
})}
|
||||
} catch (e) {
|
||||
console.log(e.message)
|
||||
res.sendStatus(500)
|
||||
@@ -14,10 +19,12 @@ const postLookFirmware = async (req, res, next) => {
|
||||
}
|
||||
|
||||
const postSyncFirmware = async (req, res, next) => {
|
||||
const { serialNumber, hash, version, type, hardwareIndex, hardwareVersion } = req.body
|
||||
const { serialNumber, firmwareHash, moduleType, position, length } = req.body
|
||||
try {
|
||||
const obj = await firmware.syncFirmware(serialNumber, hash, version, type, hardwareIndex, hardwareVersion)
|
||||
res.send(obj)
|
||||
const buffer = await firmware.syncFirmware(serialNumber, firmwareHash, moduleType, position, length)
|
||||
|
||||
if (!buffer) { res.sendStatus(400); }
|
||||
else { res.send(buffer) }
|
||||
} catch (e) {
|
||||
console.log(e.message)
|
||||
res.sendStatus(500)
|
||||
|
||||
@@ -1,67 +1,240 @@
|
||||
const services = require('../services')
|
||||
const util = require('../util')
|
||||
|
||||
const { device } = services
|
||||
|
||||
const getModuleMsn = (req) => {
|
||||
return req.query.msn || req.query.id || req.body.module
|
||||
}
|
||||
|
||||
const getRelayMsn = (req) => {
|
||||
return req.body.relayMsn
|
||||
}
|
||||
|
||||
const postGetRequestToDo = async (req, res, next) => {
|
||||
///// Emit event to server
|
||||
try {
|
||||
await device.postRequestToDo(req.body.relayMsn, req.body);
|
||||
await device.getRequestToDo(req.body.relayMsn);
|
||||
var response = { todo: [{ serialNumber: req.body.relayMsn, configuration: 1 }] };
|
||||
await device.postRequestToDo(getRelayMsn(req), req.body);
|
||||
const todo = await device.getRequestToDo(getRelayMsn(req));
|
||||
var response = { todo };
|
||||
console.log(req.body);
|
||||
res.send(response);
|
||||
} catch (error) {
|
||||
res.send(500);
|
||||
res.sendStatus(500);
|
||||
}
|
||||
}
|
||||
|
||||
const getModuleConfiguration = async (req, res, next) => {
|
||||
///// Emit event to server
|
||||
var response = {
|
||||
"name": "LRBST-R-TARACE",
|
||||
"inventory": [
|
||||
"7400040670330001"
|
||||
],
|
||||
"wakeUpTimes": [
|
||||
60,
|
||||
480,
|
||||
540,
|
||||
600,
|
||||
660,
|
||||
720,
|
||||
780,
|
||||
840,
|
||||
900,
|
||||
960,
|
||||
1020,
|
||||
1080
|
||||
]
|
||||
};
|
||||
try {
|
||||
///// Emit event to server
|
||||
var response = await device.getConfiguration(getModuleMsn(req))
|
||||
|
||||
res.send(response);
|
||||
res.send(response.configuration);
|
||||
} catch (error) {
|
||||
res.sendStatus(500);
|
||||
}
|
||||
}
|
||||
|
||||
const setModuleConfiguration = async (req, res, next) => {
|
||||
try {
|
||||
///// Emit event to server
|
||||
await device.postConfiguration(getModuleMsn(req), req.body, util.dateToTimestamp(req.body.flashTimeStamp))
|
||||
|
||||
}
|
||||
|
||||
const getModulePrograms = async (req, res, next) => {
|
||||
|
||||
}
|
||||
|
||||
const setModulePrograms = async (req, res, next) => {
|
||||
|
||||
res.sendStatus(200);
|
||||
} catch (error) {
|
||||
res.sendStatus(500);
|
||||
}
|
||||
}
|
||||
|
||||
const reportModuleDataSent = async (req, res, next) => {
|
||||
res.send(200);
|
||||
try {
|
||||
///// Emit event to server
|
||||
await device.postConfiguration(getModuleMsn(req), null, util.dateToTimestamp(req.body.sentAt))
|
||||
|
||||
res.sendStatus(200);
|
||||
} catch (error) {
|
||||
res.sendStatus(500);
|
||||
}
|
||||
}
|
||||
|
||||
const getModulePrograms = async (req, res, next) => {
|
||||
try {
|
||||
///// Emit event to server
|
||||
var response = await device.getPrograms(getModuleMsn(req))
|
||||
|
||||
res.send(response.programs);
|
||||
} catch (error) {
|
||||
res.sendStatus(500);
|
||||
}
|
||||
}
|
||||
|
||||
const setModulePrograms = async (req, res, next) => {
|
||||
try {
|
||||
///// Emit event to server
|
||||
await device.postPrograms(getModuleMsn(req), req.body, util.dateToTimestamp(req.body.flashTimeStamp))
|
||||
|
||||
res.sendStatus(200);
|
||||
} catch (error) {
|
||||
res.sendStatus(500);
|
||||
}
|
||||
}
|
||||
|
||||
const reportProgramsDataSent = async (req, res, next) => {
|
||||
try {
|
||||
///// Emit event to server
|
||||
await device.postPrograms(getModuleMsn(req), null, util.dateToTimestamp(req.body.programmingTimestamp))
|
||||
|
||||
res.sendStatus(200);
|
||||
} catch (error) {
|
||||
res.sendStatus(500);
|
||||
}
|
||||
}
|
||||
|
||||
const reportAllModuleProgramsDataSent = async (req, res, next) => {
|
||||
try {
|
||||
///// Emit event to server
|
||||
await device.postPrograms(getModuleMsn(req), null, util.dateToTimestamp(req.body.sentAt))
|
||||
|
||||
res.sendStatus(200);
|
||||
} catch (error) {
|
||||
res.sendStatus(500);
|
||||
}
|
||||
}
|
||||
|
||||
const getModuleSlots = async (req, res, next) => {
|
||||
try {
|
||||
///// Emit event to server
|
||||
var response = await device.getSlots(getModuleMsn(req))
|
||||
|
||||
res.send(response.slots);
|
||||
} catch (error) {
|
||||
res.sendStatus(500);
|
||||
}
|
||||
}
|
||||
|
||||
const setModuleSlots = async (req, res, next) => {
|
||||
try {
|
||||
///// Emit event to server
|
||||
await device.postSlots(getModuleMsn(req), req.body, util.dateToTimestamp(req.body.flashTimeStamp))
|
||||
|
||||
res.sendStatus(200);
|
||||
} catch (error) {
|
||||
res.sendStatus(500);
|
||||
}
|
||||
}
|
||||
|
||||
const reportSlotsDataSent = async (req, res, next) => {
|
||||
try {
|
||||
///// Emit event to server
|
||||
await device.postSlots(getModuleMsn(req), null, util.dateToTimestamp(req.body.programmingTimestamp))
|
||||
|
||||
res.sendStatus(200);
|
||||
} catch (error) {
|
||||
res.sendStatus(500);
|
||||
}
|
||||
}
|
||||
|
||||
const reportAllModuleSlotsDataSent = async (req, res, next) => {
|
||||
try {
|
||||
///// Emit event to server
|
||||
await device.postSlots(getModuleMsn(req), null, util.dateToTimestamp(req.body.sentAt))
|
||||
|
||||
res.sendStatus(200);
|
||||
} catch (error) {
|
||||
res.sendStatus(500);
|
||||
}
|
||||
}
|
||||
|
||||
const getManualCommand = async (req, res, next) => {
|
||||
try {
|
||||
///// Emit event to server
|
||||
var response = await device.getManualCommand(getModuleMsn(req))
|
||||
|
||||
res.send(response.manualCommand);
|
||||
} catch (error) {
|
||||
res.sendStatus(500);
|
||||
}
|
||||
}
|
||||
|
||||
const reportManualCommandSent = async (req, res, next) => {
|
||||
try {
|
||||
///// Emit event to server
|
||||
await device.postManualCommand(getModuleMsn(req), null)
|
||||
|
||||
res.sendStatus(200);
|
||||
} catch (error) {
|
||||
res.sendStatus(500);
|
||||
}
|
||||
}
|
||||
|
||||
const getStatusCommand = async (req, res, next) => {
|
||||
try {
|
||||
///// Emit event to server
|
||||
var response = await device.getStatusCommand(getModuleMsn(req))
|
||||
|
||||
res.send(response.statusCommand);
|
||||
} catch (error) {
|
||||
res.sendStatus(500);
|
||||
}
|
||||
}
|
||||
|
||||
const reportStatusCommandSent = async (req, res, next) => {
|
||||
try {
|
||||
///// Emit event to server
|
||||
await device.postStatusCommand(getModuleMsn(req), null)
|
||||
|
||||
res.sendStatus(200);
|
||||
} catch (error) {
|
||||
res.sendStatus(500);
|
||||
}
|
||||
}
|
||||
|
||||
const getAcknowledgeAlerts = async (req, res, next) => {
|
||||
try {
|
||||
///// Emit event to server
|
||||
var response = await device.getAcknowledgedAlerts(getModuleMsn(req))
|
||||
|
||||
res.send(response.acknowledgedAlerts);
|
||||
} catch (error) {
|
||||
res.sendStatus(500);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const reportAcknowledgeAlerts = async (req, res, next) => {
|
||||
try {
|
||||
///// Emit event to server
|
||||
await device.postAcknowledgedAlerts(getModuleMsn(req), null)
|
||||
|
||||
res.sendStatus(200);
|
||||
} catch (error) {
|
||||
res.sendStatus(500);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
postGetRequestToDo,
|
||||
|
||||
getModuleConfiguration,
|
||||
setModuleConfiguration,
|
||||
reportModuleDataSent,
|
||||
|
||||
getModulePrograms,
|
||||
setModulePrograms,
|
||||
reportModuleDataSent,
|
||||
reportProgramsDataSent,
|
||||
reportAllModuleProgramsDataSent,
|
||||
|
||||
getModuleSlots,
|
||||
setModuleSlots,
|
||||
reportSlotsDataSent,
|
||||
reportAllModuleSlotsDataSent,
|
||||
|
||||
getManualCommand,
|
||||
reportManualCommandSent,
|
||||
|
||||
getStatusCommand,
|
||||
reportStatusCommandSent,
|
||||
|
||||
getAcknowledgeAlerts,
|
||||
reportAcknowledgeAlerts,
|
||||
}
|
||||
@@ -1,17 +1,21 @@
|
||||
const status = require('./status.controller')
|
||||
const data = require('./data.controller')
|
||||
const senbus_value = require('./senbus_value.controller')
|
||||
const firmware = require('./firmware.controller')
|
||||
const ipx = require('./ipx.controller')
|
||||
const journal = require('./journal.controller')
|
||||
const longpolling = require('./longpolling.controller')
|
||||
const grtd = require('./grtd.controller')
|
||||
const api = require('./api.controller')
|
||||
|
||||
module.exports = {
|
||||
status,
|
||||
data,
|
||||
senbus_value,
|
||||
firmware,
|
||||
ipx,
|
||||
journal,
|
||||
longpolling,
|
||||
grtd,
|
||||
api,
|
||||
}
|
||||
@@ -84,10 +84,6 @@ const getModuleRequest = async (req, res, next) => {
|
||||
if (error) { res.send(error); }
|
||||
else { res.send(body); }
|
||||
});
|
||||
|
||||
req.on("close", function () {
|
||||
console.log("Request cancelled by client");
|
||||
});
|
||||
}
|
||||
|
||||
const postModuleRequest = async (req, res, next) => {
|
||||
@@ -96,10 +92,6 @@ const postModuleRequest = async (req, res, next) => {
|
||||
if (error) { res.send(error); }
|
||||
else { res.send(body); }
|
||||
});
|
||||
|
||||
req.on("close", function () {
|
||||
console.log("Request cancelled by client");
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
||||
16
controllers/senbus_value.controller.js
Normal file
16
controllers/senbus_value.controller.js
Normal file
@@ -0,0 +1,16 @@
|
||||
const services = require('../services')
|
||||
|
||||
const { senbus_value } = services
|
||||
|
||||
const postSenbusValue = async (req, res, next) => {
|
||||
try {
|
||||
res.sendStatus(200)
|
||||
} catch (e) {
|
||||
console.log(e.message)
|
||||
res.sendStatus(500)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
postSenbusValue,
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
const services = require('../services')
|
||||
|
||||
const { status } = services
|
||||
const { status, device } = services
|
||||
|
||||
const postSetStatus = async (req, res, next) => {
|
||||
try {
|
||||
@@ -9,11 +9,13 @@ const postSetStatus = async (req, res, next) => {
|
||||
if (req.body.status) {
|
||||
const values = { inputsAlerts: req.body.status.inputsAlerts || [], msn: req.body.msn, id: req.params.id }
|
||||
code = await status.createAlerts(values)
|
||||
code = await device.updateStatus(req.body.msn, req.body, req.body.dialogTimestamp)
|
||||
|
||||
} else if (req.body.radioProducts) {
|
||||
for (const product of req.body.radioProducts) {
|
||||
const values = { inputsAlerts: product.inputsAlerts || [], msn: product.msn, id: req.params.id }
|
||||
code = await status.createAlerts(values)
|
||||
code = await device.updateStatus(product.msn, product, product.dialogTimestamp)
|
||||
}
|
||||
}
|
||||
res.send(code)
|
||||
|
||||
Reference in New Issue
Block a user