mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-14 18:05:48 +00:00
Refactor device controller method names
This commit is contained in:
@ -57,9 +57,9 @@ export class DeviceController {
|
|||||||
@ApiBearerAuth()
|
@ApiBearerAuth()
|
||||||
@UseGuards(JwtAuthGuard)
|
@UseGuards(JwtAuthGuard)
|
||||||
@Get(':deviceId')
|
@Get(':deviceId')
|
||||||
async getDevicesByDeviceId(@Param('deviceId') deviceId: string) {
|
async getDeviceDetailsByDeviceId(@Param('deviceId') deviceId: string) {
|
||||||
try {
|
try {
|
||||||
return await this.deviceService.getDevicesByDeviceId(deviceId);
|
return await this.deviceService.getDeviceDetailsByDeviceId(deviceId);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
throw new Error(err);
|
throw new Error(err);
|
||||||
}
|
}
|
||||||
@ -67,9 +67,9 @@ export class DeviceController {
|
|||||||
@ApiBearerAuth()
|
@ApiBearerAuth()
|
||||||
@UseGuards(JwtAuthGuard)
|
@UseGuards(JwtAuthGuard)
|
||||||
@Get(':deviceId/functions')
|
@Get(':deviceId/functions')
|
||||||
async getDevicesInstructionByDeviceId(@Param('deviceId') deviceId: string) {
|
async getDeviceInstructionByDeviceId(@Param('deviceId') deviceId: string) {
|
||||||
try {
|
try {
|
||||||
return await this.deviceService.getDevicesInstructionByDeviceId(deviceId);
|
return await this.deviceService.getDeviceInstructionByDeviceId(deviceId);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
throw new Error(err);
|
throw new Error(err);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user