|
|
|
@ -1158,6 +1158,29 @@ fastify.post('/api/generateHardwareMasterId/:storeId', {
|
|
|
|
|
handler: storeController.generateHardwareMasterId,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
fastify.post('/api/getSensorByHardwareId/:storeId', {
|
|
|
|
|
schema: {
|
|
|
|
|
description: 'Fetch details of a specific sensor using hardwareId',
|
|
|
|
|
tags: ['Store-Data'],
|
|
|
|
|
summary: 'Retrieve sensor details by hardwareId',
|
|
|
|
|
params: {
|
|
|
|
|
required: ['storeId'],
|
|
|
|
|
type: 'object',
|
|
|
|
|
properties: {
|
|
|
|
|
storeId: { type: 'string', description: 'Store ID' },
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
body: {
|
|
|
|
|
type: 'object',
|
|
|
|
|
required: ['hardwareId'],
|
|
|
|
|
properties: {
|
|
|
|
|
hardwareId: { type: 'string', description: 'Hardware ID of the sensor' },
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
handler: storeController.getSensorByHardwareId,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
fastify.post("/api/updateSensorById/:_id", {
|
|
|
|
|
schema: {
|
|
|
|
|
description: "Edit specific sensor fields",
|
|
|
|
|