Refactor device controller method names

This commit is contained in:
faris Aljohari
2024-03-25 14:28:13 +03:00
parent fba0063268
commit a289b1645c

View File

@ -57,9 +57,9 @@ export class DeviceController {
@ApiBearerAuth()
@UseGuards(JwtAuthGuard)
@Get(':deviceId')
async getDevicesByDeviceId(@Param('deviceId') deviceId: string) {
async getDeviceDetailsByDeviceId(@Param('deviceId') deviceId: string) {
try {
return await this.deviceService.getDevicesByDeviceId(deviceId);
return await this.deviceService.getDeviceDetailsByDeviceId(deviceId);
} catch (err) {
throw new Error(err);
}
@ -67,9 +67,9 @@ export class DeviceController {
@ApiBearerAuth()
@UseGuards(JwtAuthGuard)
@Get(':deviceId/functions')
async getDevicesInstructionByDeviceId(@Param('deviceId') deviceId: string) {
async getDeviceInstructionByDeviceId(@Param('deviceId') deviceId: string) {
try {
return await this.deviceService.getDevicesInstructionByDeviceId(deviceId);
return await this.deviceService.getDeviceInstructionByDeviceId(deviceId);
} catch (err) {
throw new Error(err);
}