Refactor device controller and service

This commit is contained in:
faris Aljohari
2024-06-25 10:02:55 +03:00
parent 640a92619e
commit b0dba387fb
2 changed files with 7 additions and 7 deletions

View File

@ -200,10 +200,10 @@ export class DeviceController {
}
@ApiBearerAuth()
@UseGuards(JwtAuthGuard)
@Get('getaway/:gatewayUuid/devices')
async getDevicesInGetaway(@Param('gatewayUuid') gatewayUuid: string) {
@Get('gateway/:gatewayUuid/devices')
async getDevicesInGateway(@Param('gatewayUuid') gatewayUuid: string) {
try {
return await this.deviceService.getDevicesInGetaway(gatewayUuid);
return await this.deviceService.getDevicesInGateway(gatewayUuid);
} catch (error) {
throw new HttpException(
error.message || 'Internal server error',