feat: filter professionals by city and proximity
- findAllActive now accepts city, lat, lng params - City filter: case-insensitive contains on users.city - Proximity sort: Haversine within city before services/score ranking - Controller exposes ?city=&lat=&lng= query params Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
00a6f637f6
commit
d7a0769b46
@@ -16,7 +16,10 @@ export class ProfessionalsController {
|
||||
@Get()
|
||||
findAllActive(@Req() req) {
|
||||
const search = req.query.search as string | undefined;
|
||||
return this.pros.findAllActive(search);
|
||||
const city = req.query.city as string | undefined;
|
||||
const lat = req.query.lat ? parseFloat(req.query.lat as string) : undefined;
|
||||
const lng = req.query.lng ? parseFloat(req.query.lng as string) : undefined;
|
||||
return this.pros.findAllActive(search, city, lat, lng);
|
||||
}
|
||||
|
||||
@Get('pending')
|
||||
|
||||
Reference in New Issue
Block a user