Skip to content

Commit e6f5a05

Browse files
committed
use PostFormValue
1 parent fdfd242 commit e6f5a05

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

routers/web/repo/actions/view.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -850,7 +850,7 @@ func Run(ctx *context_module.Context) {
850850
inputs := make(map[string]any)
851851
if workflowDispatch := workflow.WorkflowDispatchConfig(); workflowDispatch != nil {
852852
for name, config := range workflowDispatch.Inputs {
853-
value := ctx.Req.PostForm.Get(name)
853+
value := ctx.Req.PostFormValue(name)
854854
if config.Type == "boolean" {
855855
// https://www.w3.org/TR/html401/interact/forms.html
856856
// https://stackoverflow.com/questions/11424037/do-checkbox-inputs-only-post-data-if-theyre-checked

routers/web/repo/issue_dependency.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ func RemoveDependency(ctx *context.Context) {
109109
}
110110

111111
// Dependency Type
112-
depTypeStr := ctx.Req.PostForm.Get("dependencyType")
112+
depTypeStr := ctx.Req.PostFormValue("dependencyType")
113113

114114
var depType issues_model.DependencyType
115115

routers/web/repo/issue_watch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func IssueWatch(ctx *context.Context) {
4646
return
4747
}
4848

49-
watch, err := strconv.ParseBool(ctx.Req.PostForm.Get("watch"))
49+
watch, err := strconv.ParseBool(ctx.Req.PostFormValue("watch"))
5050
if err != nil {
5151
ctx.ServerError("watch is not bool", err)
5252
return

0 commit comments

Comments
 (0)