mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-08-06 09:39:44 +08:00
Related refactors to ctx.FormX functions (#16567)
* use FormTrim if posible * speedup goGet * only convert if nessesary
This commit is contained in:
@ -135,7 +135,7 @@ func Search(ctx *context.APIContext) {
|
||||
opts := &models.SearchRepoOptions{
|
||||
ListOptions: utils.GetListOptions(ctx),
|
||||
Actor: ctx.User,
|
||||
Keyword: strings.Trim(ctx.FormString("q"), " "),
|
||||
Keyword: ctx.FormTrim("q"),
|
||||
OwnerID: ctx.FormInt64("uid"),
|
||||
PriorityOwnerID: ctx.FormInt64("priority_owner_id"),
|
||||
TeamID: ctx.FormInt64("team_id"),
|
||||
|
Reference in New Issue
Block a user