File tree 3 files changed +4
-4
lines changed
3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,7 @@ func GetAllOrgs(ctx *context.APIContext) {
106
106
listOptions := utils .GetListOptions (ctx )
107
107
108
108
users , maxResults , err := models .SearchUsers (& models.SearchUserOptions {
109
+ Actor : ctx .User ,
109
110
Type : models .UserTypeOrganization ,
110
111
OrderBy : models .SearchOrderByAlphabetically ,
111
112
ListOptions : listOptions ,
Original file line number Diff line number Diff line change @@ -130,6 +130,7 @@ func GetAll(ctx *context.APIContext) {
130
130
listOptions := utils .GetListOptions (ctx )
131
131
132
132
publicOrgs , maxResults , err := models .SearchUsers (& models.SearchUserOptions {
133
+ Actor : ctx .User ,
133
134
ListOptions : listOptions ,
134
135
Type : models .UserTypeOrganization ,
135
136
OrderBy : models .SearchOrderByAlphabetically ,
Original file line number Diff line number Diff line change @@ -56,15 +56,13 @@ func Search(ctx *context.APIContext) {
56
56
57
57
listOptions := utils .GetListOptions (ctx )
58
58
59
- opts := & models.SearchUserOptions {
59
+ users , maxResults , err := models . SearchUsers ( & models.SearchUserOptions {
60
60
Actor : ctx .User ,
61
61
Keyword : strings .Trim (ctx .Query ("q" ), " " ),
62
62
UID : ctx .QueryInt64 ("uid" ),
63
63
Type : models .UserTypeIndividual ,
64
64
ListOptions : listOptions ,
65
- }
66
-
67
- users , maxResults , err := models .SearchUsers (opts )
65
+ })
68
66
if err != nil {
69
67
ctx .JSON (http .StatusInternalServerError , map [string ]interface {}{
70
68
"ok" : false ,
You can’t perform that action at this time.
0 commit comments