fix: mockup topic
This commit is contained in:
@@ -10,14 +10,14 @@ export default abstract class CommandService {
|
||||
try {
|
||||
const topicData = `${body.merchantName}/${body.floorName}_${body.unitNumber}-${body.deviceName}-${body.roomName}-${body.deviceType}-${body.commandType}-${body.towerNumber}`
|
||||
|
||||
if (topicData == 'SAVY/01_L2-L-LV-S-C-T1' && ['On', 'Off'].includes(body.payload.action)) {
|
||||
if (topicData == 'SAVY/L2_01-L-LV-S-C-T1' && ['On', 'Off'].includes(body.payload.action)) {
|
||||
return {
|
||||
status: 'success',
|
||||
message: 'Command accepted',
|
||||
receivedAt: new Date().toISOString(),
|
||||
}
|
||||
}
|
||||
if (topicData == 'SAVY/01_L2-BL-LV-S-C-T1' && ['Open', 'Close'].includes(body.payload.action)) {
|
||||
if (topicData == 'SAVY/L2_01-BL-LV-S-C-T1' && ['Open', 'Close'].includes(body.payload.action)) {
|
||||
return {
|
||||
status: 'success',
|
||||
message: 'Command accepted',
|
||||
|
||||
Reference in New Issue
Block a user