diff options
author | 6543 <6543@obermui.de> | 2020-12-25 09:59:32 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-25 11:59:32 +0200 |
commit | a19447aed128ecadfcd938d6a80cd4951af1f4ce (patch) | |
tree | 6312bf946d601aab29731645a4777feeaea66036 /routers/api/v1/user | |
parent | 04ae0f2f3f4556c6d0b4adc5f2cffd0cc7d25151 (diff) | |
download | gitea-a19447aed128ecadfcd938d6a80cd4951af1f4ce.tar.gz gitea-a19447aed128ecadfcd938d6a80cd4951af1f4ce.zip |
migrate from com.* to alternatives (#14103)
* remove github.com/unknwon/com from models
* dont use "com.ToStr()"
* replace "com.ToStr" with "fmt.Sprint" where its easy to do
* more refactor
* fix test
* just "proxy" Copy func for now
* as per @lunny
Diffstat (limited to 'routers/api/v1/user')
-rw-r--r-- | routers/api/v1/user/user.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/routers/api/v1/user/user.go b/routers/api/v1/user/user.go index 07d5e9112b..b860219e62 100644 --- a/routers/api/v1/user/user.go +++ b/routers/api/v1/user/user.go @@ -15,8 +15,6 @@ import ( "code.gitea.io/gitea/modules/convert" api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/routers/api/v1/utils" - - "github.com/unknwon/com" ) // Search search users @@ -61,7 +59,7 @@ func Search(ctx *context.APIContext) { opts := &models.SearchUserOptions{ Keyword: strings.Trim(ctx.Query("q"), " "), - UID: com.StrTo(ctx.Query("uid")).MustInt64(), + UID: ctx.QueryInt64("uid"), Type: models.UserTypeIndividual, ListOptions: listOptions, } |