feat: implement connection-based visibility filtering for agent search results
This commit is contained in:
@@ -41,10 +41,12 @@ export class AgentsController {
|
||||
|
||||
@Get()
|
||||
@Public()
|
||||
@UseGuards(OptionalAuthGuard)
|
||||
@ApiOperation({ summary: 'Search and list agents' })
|
||||
@ApiResponse({ status: 200, description: 'Agents retrieved successfully' })
|
||||
async searchAgents(@Query() dto: SearchAgentsDto) {
|
||||
return this.agentsService.searchAgents(dto);
|
||||
async searchAgents(@Query() dto: SearchAgentsDto, @Req() req: any) {
|
||||
const requestingUserId = req.user?.id || null;
|
||||
return this.agentsService.searchAgents(dto, requestingUserId);
|
||||
}
|
||||
|
||||
@Get('featured')
|
||||
|
||||
Reference in New Issue
Block a user