File tree Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -1459,7 +1459,7 @@ function searchUsers() {
1459
1459
url : suburl + '/api/v1/users/search?q={query}' ,
1460
1460
onResponse : function ( response ) {
1461
1461
var items = [ ] ;
1462
- $ . each ( response . data , function ( i , item ) {
1462
+ $ . each ( response , function ( i , item ) {
1463
1463
var title = item . login ;
1464
1464
if ( item . full_name && item . full_name . length > 0 ) {
1465
1465
title += ' (' + item . full_name + ')' ;
Original file line number Diff line number Diff line change @@ -45,10 +45,7 @@ func Search(ctx *context.APIContext) {
45
45
46
46
users , _ , err := models .SearchUsers (opts )
47
47
if err != nil {
48
- ctx .JSON (500 , map [string ]interface {}{
49
- "ok" : false ,
50
- "error" : err .Error (),
51
- })
48
+ ctx .Error (500 , "UserSearch" , err )
52
49
return
53
50
}
54
51
@@ -65,10 +62,7 @@ func Search(ctx *context.APIContext) {
65
62
}
66
63
}
67
64
68
- ctx .JSON (200 , map [string ]interface {}{
69
- "ok" : true ,
70
- "data" : results ,
71
- })
65
+ ctx .JSON (200 , results )
72
66
}
73
67
74
68
// GetInfo get user's information
You can’t perform that action at this time.
0 commit comments