diff --git a/scnserver/TODO.md b/scnserver/TODO.md index 488c9d8..c2d292c 100644 --- a/scnserver/TODO.md +++ b/scnserver/TODO.md @@ -15,6 +15,7 @@ - app-store link in HTML - deploy + - deploy apache conf directly - backups (no longer container in my db_backup, perhaps extend it to sqlite?) diff --git a/scnserver/logic/application.go b/scnserver/logic/application.go index c9618da..53c7a4a 100644 --- a/scnserver/logic/application.go +++ b/scnserver/logic/application.go @@ -263,6 +263,10 @@ func (app *Application) StartRequest(g *gin.Context, uri any, query any, body an if err := g.ShouldBindWith(form, binding.Form); err != nil { return nil, langext.Ptr(ginresp.APIError(g, 400, apierr.BINDFAIL_BODY_PARAM, "Failed to read multipart-form", err)) } + } else if g.ContentType() == "application/x-www-form-urlencoded" { + if err := g.ShouldBindWith(form, binding.Form); err != nil { + return nil, langext.Ptr(ginresp.APIError(g, 400, apierr.BINDFAIL_BODY_PARAM, "Failed to read urlencoded-form", err)) + } } else { if !ignoreWrongContentType { return nil, langext.Ptr(ginresp.APIError(g, 400, apierr.BINDFAIL_BODY_PARAM, "missing form body", nil))