mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-31 22:32:25 -05:00
parent
dc338dc881
commit
742f985d5b
15 changed files with 322 additions and 56 deletions
|
|
@ -49,13 +49,14 @@ func (m *Module) StatusCreatePOSTHandler(c *gin.Context) {
|
|||
}
|
||||
|
||||
// extract the status create form from the request context
|
||||
l.Tracef("parsing request form: %s", c.Request.Form)
|
||||
l.Debugf("parsing request form: %s", c.Request.Form)
|
||||
form := &model.AdvancedStatusCreateForm{}
|
||||
if err := c.ShouldBind(form); err != nil || form == nil {
|
||||
l.Debugf("could not parse form from request: %s", err)
|
||||
c.JSON(http.StatusBadRequest, gin.H{"error": "missing one or more required form values"})
|
||||
return
|
||||
}
|
||||
l.Debugf("handling status request form: %+v", form)
|
||||
|
||||
// Give the fields on the request form a first pass to make sure the request is superficially valid.
|
||||
l.Tracef("validating form %+v", form)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue