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:
z3n
2026-06-19 13:31:49 +00:00
parent eb07ca085f
commit c8b3e393ea
2 changed files with 24 additions and 3 deletions

View File

@@ -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> {