aboutsummaryrefslogtreecommitdiffstats
path: root/modules/context/repo.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-07-29 09:42:15 +0800
committerGitHub <noreply@github.com>2021-07-29 03:42:15 +0200
commit33e0b38287fdc3487112062300b8dd3c95415ee7 (patch)
tree603394d8f303de1031c21da0d3d3a3cdc0b2bfda /modules/context/repo.go
parent370516883717de0e6e2087c12d368eb1465ee3b0 (diff)
downloadgitea-33e0b38287fdc3487112062300b8dd3c95415ee7.tar.gz
gitea-33e0b38287fdc3487112062300b8dd3c95415ee7.zip
Rename context.Query to context.Form (#16562)
Diffstat (limited to 'modules/context/repo.go')
-rw-r--r--modules/context/repo.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/context/repo.go b/modules/context/repo.go
index ea8323bdfc..abd9ca5481 100644
--- a/modules/context/repo.go
+++ b/modules/context/repo.go
@@ -346,7 +346,7 @@ func repoAssignment(ctx *Context, repo *models.Repository) {
// Check access.
if ctx.Repo.Permission.AccessMode == models.AccessModeNone {
- if ctx.Query("go-get") == "1" {
+ if ctx.Form("go-get") == "1" {
EarlyResponseForGoGetMeta(ctx)
return
}
@@ -415,7 +415,7 @@ func RepoAssignment(ctx *Context) (cancel context.CancelFunc) {
owner, err = models.GetUserByName(userName)
if err != nil {
if models.IsErrUserNotExist(err) {
- if ctx.Query("go-get") == "1" {
+ if ctx.Form("go-get") == "1" {
EarlyResponseForGoGetMeta(ctx)
return
}
@@ -437,7 +437,7 @@ func RepoAssignment(ctx *Context) (cancel context.CancelFunc) {
if err == nil {
RedirectToRepo(ctx, redirectRepoID)
} else if models.IsErrRepoRedirectNotExist(err) {
- if ctx.Query("go-get") == "1" {
+ if ctx.Form("go-get") == "1" {
EarlyResponseForGoGetMeta(ctx)
return
}
@@ -618,7 +618,7 @@ func RepoAssignment(ctx *Context) (cancel context.CancelFunc) {
}
}
- if ctx.Query("go-get") == "1" {
+ if ctx.Form("go-get") == "1" {
ctx.Data["GoGetImport"] = ComposeGoGetImport(owner.Name, repo.Name)
prefix := setting.AppURL + path.Join(owner.Name, repo.Name, "src", "branch", ctx.Repo.BranchName)
ctx.Data["GoDocDirectory"] = prefix + "{/dir}"