mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Rename context.Query to context.Form (#16562)
This commit is contained in:
@@ -15,7 +15,7 @@ import (
|
||||
|
||||
// RetrieveLabels find all the labels of an organization
|
||||
func RetrieveLabels(ctx *context.Context) {
|
||||
labels, err := models.GetLabelsByOrgID(ctx.Org.Organization.ID, ctx.Query("sort"), models.ListOptions{})
|
||||
labels, err := models.GetLabelsByOrgID(ctx.Org.Organization.ID, ctx.Form("sort"), models.ListOptions{})
|
||||
if err != nil {
|
||||
ctx.ServerError("RetrieveLabels.GetLabels", err)
|
||||
return
|
||||
@@ -25,7 +25,7 @@ func RetrieveLabels(ctx *context.Context) {
|
||||
}
|
||||
ctx.Data["Labels"] = labels
|
||||
ctx.Data["NumLabels"] = len(labels)
|
||||
ctx.Data["SortType"] = ctx.Query("sort")
|
||||
ctx.Data["SortType"] = ctx.Form("sort")
|
||||
}
|
||||
|
||||
// NewLabel create new label for organization
|
||||
@@ -79,7 +79,7 @@ func UpdateLabel(ctx *context.Context) {
|
||||
|
||||
// DeleteLabel delete a label
|
||||
func DeleteLabel(ctx *context.Context) {
|
||||
if err := models.DeleteLabel(ctx.Org.Organization.ID, ctx.QueryInt64("id")); err != nil {
|
||||
if err := models.DeleteLabel(ctx.Org.Organization.ID, ctx.FormInt64("id")); err != nil {
|
||||
ctx.Flash.Error("DeleteLabel: " + err.Error())
|
||||
} else {
|
||||
ctx.Flash.Success(ctx.Tr("repo.issues.label_deletion_success"))
|
||||
|
Reference in New Issue
Block a user