mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-10 23:27:31 +00:00
added listing api
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import {
|
||||
Body,
|
||||
Controller,
|
||||
Get,
|
||||
HttpStatus,
|
||||
Param,
|
||||
Post,
|
||||
@ -65,4 +66,22 @@ export class UserDevicePermissionController {
|
||||
throw new Error(err);
|
||||
}
|
||||
}
|
||||
|
||||
@ApiBearerAuth()
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@Get('list')
|
||||
async fetchDevicePermission() {
|
||||
try {
|
||||
const deviceDetails =
|
||||
await this.userDevicePermissionService.fetchuserPermission();
|
||||
return {
|
||||
statusCode: HttpStatus.OK,
|
||||
message: 'Device Details fetched Successfully',
|
||||
data: deviceDetails,
|
||||
};
|
||||
} catch (err) {
|
||||
throw new Error(err);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user