fix: sync bug
This commit is contained in:
@@ -38,8 +38,7 @@ export class DevicesController {
|
||||
@UseGuards(DeviceAuthGuard)
|
||||
@ApiOperation({ summary: 'Sync device state with server' })
|
||||
async sync(@Param('deviceId') deviceId: string, @Body() dto: SyncDto, @Req() req: any) {
|
||||
const device = req.device;
|
||||
return this.devicesService.sync(device, dto);
|
||||
return this.devicesService.sync(req.user, dto);
|
||||
}
|
||||
|
||||
@Post(':deviceId/commands/:commandId/ack')
|
||||
@@ -51,8 +50,7 @@ export class DevicesController {
|
||||
@Body() dto: AckCommandDto,
|
||||
@Req() req: any,
|
||||
) {
|
||||
const device = req.device;
|
||||
return this.devicesService.ackCommand(device, commandId, dto);
|
||||
return this.devicesService.ackCommand(req.user, commandId, dto);
|
||||
}
|
||||
|
||||
@Get('generation-code')
|
||||
|
||||
Reference in New Issue
Block a user