Skip to content

Trivial fixes #33304

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use PostFormValue
  • Loading branch information
wxiaoguang committed Jan 16, 2025
commit e6f5a052b24d95d2184703d656278d050ebc5ab6
2 changes: 1 addition & 1 deletion routers/web/repo/actions/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ func Run(ctx *context_module.Context) {
inputs := make(map[string]any)
if workflowDispatch := workflow.WorkflowDispatchConfig(); workflowDispatch != nil {
for name, config := range workflowDispatch.Inputs {
value := ctx.Req.PostForm.Get(name)
value := ctx.Req.PostFormValue(name)
if config.Type == "boolean" {
// https://www.w3.org/TR/html401/interact/forms.html
// https://stackoverflow.com/questions/11424037/do-checkbox-inputs-only-post-data-if-theyre-checked
Expand Down
2 changes: 1 addition & 1 deletion routers/web/repo/issue_dependency.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func RemoveDependency(ctx *context.Context) {
}

// Dependency Type
depTypeStr := ctx.Req.PostForm.Get("dependencyType")
depTypeStr := ctx.Req.PostFormValue("dependencyType")

var depType issues_model.DependencyType

Expand Down
2 changes: 1 addition & 1 deletion routers/web/repo/issue_watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func IssueWatch(ctx *context.Context) {
return
}

watch, err := strconv.ParseBool(ctx.Req.PostForm.Get("watch"))
watch, err := strconv.ParseBool(ctx.Req.PostFormValue("watch"))
if err != nil {
ctx.ServerError("watch is not bool", err)
return
Expand Down
Loading