s3 fix
This commit is contained in:
@@ -80,14 +80,15 @@ export class AgentsController {
|
||||
return this.agentsService.getProfile(userId);
|
||||
}
|
||||
|
||||
// Public parameterized route - must come after specific routes
|
||||
@Get(':id')
|
||||
@Public()
|
||||
@ApiOperation({ summary: 'Get agent profile by ID' })
|
||||
@ApiResponse({ status: 200, description: 'Agent profile retrieved successfully' })
|
||||
@ApiResponse({ status: 404, description: 'Agent profile not found' })
|
||||
async getAgentById(@Param('id', ParseUUIDPipe) id: string) {
|
||||
return this.agentsService.getProfileById(id);
|
||||
@Get('profile/field-values')
|
||||
@UseGuards(JwtAuthGuard, RolesGuard)
|
||||
@Roles(UserRole.AGENT)
|
||||
@ApiBearerAuth()
|
||||
@ApiOperation({ summary: 'Get dynamic field values for agent profile' })
|
||||
@ApiResponse({ status: 200, description: 'Field values retrieved successfully' })
|
||||
@ApiResponse({ status: 404, description: 'Profile not found' })
|
||||
async getFieldValues(@CurrentUser('id') userId: string) {
|
||||
return this.agentsService.getFieldValues(userId);
|
||||
}
|
||||
|
||||
@Post('profile')
|
||||
@@ -132,15 +133,23 @@ export class AgentsController {
|
||||
return this.agentsService.saveFieldValues(userId, dto);
|
||||
}
|
||||
|
||||
@Get('profile/field-values')
|
||||
@UseGuards(JwtAuthGuard, RolesGuard)
|
||||
@Roles(UserRole.AGENT)
|
||||
@ApiBearerAuth()
|
||||
@ApiOperation({ summary: 'Get dynamic field values for agent profile' })
|
||||
// Public parameterized routes - MUST come after specific routes like profile/*
|
||||
@Get(':id')
|
||||
@Public()
|
||||
@ApiOperation({ summary: 'Get agent profile by ID' })
|
||||
@ApiResponse({ status: 200, description: 'Agent profile retrieved successfully' })
|
||||
@ApiResponse({ status: 404, description: 'Agent profile not found' })
|
||||
async getAgentById(@Param('id', ParseUUIDPipe) id: string) {
|
||||
return this.agentsService.getProfileById(id);
|
||||
}
|
||||
|
||||
@Get(':id/field-values')
|
||||
@Public()
|
||||
@ApiOperation({ summary: 'Get field values for an agent profile by ID (public)' })
|
||||
@ApiResponse({ status: 200, description: 'Field values retrieved successfully' })
|
||||
@ApiResponse({ status: 404, description: 'Profile not found' })
|
||||
async getFieldValues(@CurrentUser('id') userId: string) {
|
||||
return this.agentsService.getFieldValues(userId);
|
||||
@ApiResponse({ status: 404, description: 'Agent profile not found' })
|
||||
async getFieldValuesByAgentId(@Param('id', ParseUUIDPipe) id: string) {
|
||||
return this.agentsService.getFieldValuesByAgentId(id);
|
||||
}
|
||||
|
||||
// Admin endpoints
|
||||
|
||||
Reference in New Issue
Block a user