feat: add user search functionality

- Implemented `GET /users/search` endpoint in the backend to enable user search by username or display name.
- Added `search` method in `UsersService` and `UsersRepository`.
- Updated frontend `UserService` to support the new search API.
This commit is contained in:
Mathis HERRIOT
2026-01-29 15:47:03 +01:00
parent 2c18fd1c1a
commit f852835c59
4 changed files with 39 additions and 1 deletions

View File

@@ -12,6 +12,13 @@ export const UserService = {
return data;
},
async search(query: string): Promise<User[]> {
const { data } = await api.get<User[]>("/users/search", {
params: { q: query },
});
return data;
},
async updateMe(update: Partial<User>): Promise<User> {
const { data } = await api.patch<User>("/users/me", update);
return data;