File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change 6
6
package admin
7
7
8
8
import (
9
+ "strconv"
10
+
9
11
"code.gitea.io/gitea/models"
10
12
"code.gitea.io/gitea/modules/base"
11
13
"code.gitea.io/gitea/modules/context"
12
14
"code.gitea.io/gitea/modules/log"
13
15
"code.gitea.io/gitea/modules/setting"
14
- "strconv"
15
16
)
16
17
17
18
const (
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ package user
8
8
import (
9
9
"fmt"
10
10
"net/http"
11
- "strconv"
12
11
"strings"
13
12
14
13
"code.gitea.io/gitea/models"
@@ -58,14 +57,9 @@ func Search(ctx *context.APIContext) {
58
57
59
58
listOptions := utils .GetListOptions (ctx )
60
59
61
- uid , err := strconv .ParseInt (ctx .Query ("uid" ), 10 , 64 )
62
- if err != nil {
63
- ctx .Error (http .StatusUnprocessableEntity , "uid" , err )
64
- }
65
-
66
60
opts := & models.SearchUserOptions {
67
61
Keyword : strings .Trim (ctx .Query ("q" ), " " ),
68
- UID : uid ,
62
+ UID : ctx . QueryInt64 ( " uid" ) ,
69
63
Type : models .UserTypeIndividual ,
70
64
ListOptions : listOptions ,
71
65
}
You can’t perform that action at this time.
0 commit comments