feat: add user search

This commit is contained in:
Krispire Admin
2026-05-31 10:53:37 +05:30
parent 0969887008
commit d3ad443fde
4 changed files with 118 additions and 1 deletions
+6
View File
@@ -59,6 +59,12 @@ func (s *UserService) UpdateProfile(ctx context.Context, id string, name, avatar
return s.users.UpdateProfile(ctx, id, name, avatarURL, handle)
}
// Search returns users matching the query (handle or name substring).
// Used by the public user-search endpoint on the /search page.
func (s *UserService) Search(ctx context.Context, q string, limit int) ([]model.User, error) {
return s.users.Search(ctx, q, limit)
}
// GetReadingPrefs returns the user's reading prefs blob (opaque JSON).
// Used by the frontend to hydrate ReadingSettings on sign-in so the
// theme/palette/font choices roam across devices.