mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-15 18:27:05 +00:00
Refactor device controller and service
This commit is contained in:
@ -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',
|
||||
|
Reference in New Issue
Block a user