feat: rank professionals by completed services + score, search by name/profession/city
- GET /professionals now accepts ?search= instead of ?city=/page/limit - Filters each word across profession, user name, and user city (AND of OR) - Counts completed services per professional via Prisma _count filter - Sorts: most completed services first, then highest average_score - Always returns top 7 results Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
74be21eb4e
commit
00a6f637f6
@@ -15,10 +15,8 @@ export class ProfessionalsController {
|
||||
|
||||
@Get()
|
||||
findAllActive(@Req() req) {
|
||||
const page = +(req.query.page || 1);
|
||||
const limit = +(req.query.limit || 20);
|
||||
const city = req.query.city as string | undefined;
|
||||
return this.pros.findAllActive(page, limit, city);
|
||||
const search = req.query.search as string | undefined;
|
||||
return this.pros.findAllActive(search);
|
||||
}
|
||||
|
||||
@Get('pending')
|
||||
|
||||
Reference in New Issue
Block a user