mirror of
https://github.com/SyncrowIOT/backend.git
synced 2026-10-23 16:07:55 +00:00
changed date string to iso
This commit is contained in:
@@ -197,7 +197,7 @@ export class DeviceStatusFirebaseService {
|
||||
eventId: addDeviceStatusDto.log.dataId,
|
||||
eventTime: new Date(
|
||||
addDeviceStatusDto.log.properties[0].time,
|
||||
).toLocaleDateString(),
|
||||
).toISOString(),
|
||||
});
|
||||
await this.deviceStatusLogRepository.save(newLog);
|
||||
// Save the updated data to Firebase
|
||||
|
||||
@@ -37,6 +37,8 @@ export class TuyaWebSocketService {
|
||||
|
||||
this.client.message(async (ws: WebSocket, message: any) => {
|
||||
try {
|
||||
console.log(message.payload.data.bizData);
|
||||
|
||||
await this.deviceStatusFirebaseService.addDeviceStatusToFirebase({
|
||||
deviceTuyaUuid: message.payload.data.bizData.devId,
|
||||
status: message.payload.data.bizData.properties,
|
||||
|
||||
Reference in New Issue
Block a user