CreateUser test

This commit is contained in:
2022-11-24 12:53:27 +01:00
parent 37e09d6532
commit 6d80638cf8
14 changed files with 511 additions and 79 deletions

View File

@@ -167,7 +167,7 @@ func (app *Application) StartRequest(g *gin.Context, uri any, query any, body an
}
}
if body != nil && g.Request.Header.Get("Content-Type") == "application/javascript" {
if body != nil && g.Request.Header.Get("Content-Type") == "application/json" {
if err := g.ShouldBindJSON(body); err != nil {
return nil, langext.Ptr(ginresp.APIError(g, 400, apierr.BINDFAIL_BODY_PARAM, "Failed to read body", err))
}