feat: implement connection-based visibility filtering for agent search results

This commit is contained in:
pradeepkumar
2026-03-30 15:28:01 +05:30
parent 9cdf0dd897
commit 6056f160ac
2 changed files with 26 additions and 10 deletions

View File

@@ -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')