This commit is contained in:
@@ -184,6 +184,18 @@ export class UsersController {
|
|||||||
return this.userService.findPaginated(restId, query);
|
return this.userService.findPaginated(restId, query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@UseGuards(AdminAuthGuard)
|
||||||
|
@ApiBearerAuth()
|
||||||
|
@Permissions(Permission.MANAGE_USERS)
|
||||||
|
@ApiHeader(API_HEADER_SLUG)
|
||||||
|
@ApiOperation({ summary: 'Get all addresses for a user (admin)' })
|
||||||
|
@ApiParam({ name: 'userId', description: 'User ID' })
|
||||||
|
@ApiOkResponse({ description: 'List of user addresses' })
|
||||||
|
@Get('admin/users/:userId/addresses')
|
||||||
|
async adminGetUserAddresses(@Param('userId') userId: string) {
|
||||||
|
return this.userService.getUserAddresses(userId);
|
||||||
|
}
|
||||||
|
|
||||||
@UseGuards(AdminAuthGuard)
|
@UseGuards(AdminAuthGuard)
|
||||||
@ApiBearerAuth()
|
@ApiBearerAuth()
|
||||||
@Permissions(Permission.MANAGE_USERS)
|
@Permissions(Permission.MANAGE_USERS)
|
||||||
|
|||||||
Reference in New Issue
Block a user