listOptions := utils.GetListOptions(ctx)
users, maxResults, err := models.SearchUsers(&models.SearchUserOptions{
+ Actor: ctx.User,
Type: models.UserTypeOrganization,
OrderBy: models.SearchOrderByAlphabetically,
ListOptions: listOptions,
listOptions := utils.GetListOptions(ctx)
publicOrgs, maxResults, err := models.SearchUsers(&models.SearchUserOptions{
+ Actor: ctx.User,
ListOptions: listOptions,
Type: models.UserTypeOrganization,
OrderBy: models.SearchOrderByAlphabetically,
listOptions := utils.GetListOptions(ctx)
- opts := &models.SearchUserOptions{
+ users, maxResults, err := models.SearchUsers(&models.SearchUserOptions{
Actor: ctx.User,
Keyword: strings.Trim(ctx.Query("q"), " "),
UID: ctx.QueryInt64("uid"),
Type: models.UserTypeIndividual,
ListOptions: listOptions,
- }
-
- users, maxResults, err := models.SearchUsers(opts)
+ })
if err != nil {
ctx.JSON(http.StatusInternalServerError, map[string]interface{}{
"ok": false,