Update user-device-permission error message

This commit is contained in:
faris Aljohari
2024-05-05 21:32:40 +03:00
parent 16ed5b33fc
commit 0d83d10f0b
2 changed files with 4 additions and 4 deletions

View File

@ -26,8 +26,8 @@ export class UserDevicePermissionController {
private readonly userDevicePermissionService: UserDevicePermissionService,
) {}
// @ApiBearerAuth()
// @UseGuards(JwtAuthGuard)
@ApiBearerAuth()
@UseGuards(JwtAuthGuard)
@Post('add')
async addDevicePermission(
@Body() userDevicePermissionDto: UserDevicePermissionAddDto,

View File

@ -26,7 +26,7 @@ export class UserDevicePermissionService {
} catch (error) {
if (error.code === '23505') {
throw new HttpException(
'This Permission already belongs to this user',
'This User already belongs to this device',
HttpStatus.BAD_REQUEST,
);
}
@ -56,7 +56,7 @@ export class UserDevicePermissionService {
} catch (error) {
if (error.code === '23505') {
throw new HttpException(
'This Permission already belongs to this user',
'This User already belongs to this device',
HttpStatus.BAD_REQUEST,
);
}