fix(search): correction recherche fuzzy catégories
- Backend : seuil word_similarity >= 0.4 (au lieu de > 0.4) sur cat.name - Frontend : correction erreur TypeScript dans CategoryService.list() (params typé Record<string,string> pour satisfaire Angular HttpClient) — le code précédent ne compilait pas, la recherche était ignorée Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
@@ -12,8 +12,10 @@ export class CategoryService {
|
||||
private http = inject(HttpClient);
|
||||
private baseUrl = '/api/categories';
|
||||
|
||||
list(): Observable<CategoryListResponse> {
|
||||
return this.http.get<CategoryListResponse>(this.baseUrl);
|
||||
list(search?: string): Observable<CategoryListResponse> {
|
||||
const params: Record<string, string> = {};
|
||||
if (search?.trim()) params['search'] = search;
|
||||
return this.http.get<CategoryListResponse>(this.baseUrl, { params });
|
||||
}
|
||||
|
||||
browse(id: string | null): Observable<CategoryBrowseResponse> {
|
||||
|
||||
Reference in New Issue
Block a user