mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 17:02:25 -05:00
[chore] Update versions, fix lint errors (#1860)
This commit is contained in:
parent
1d4137fb88
commit
21c1552daa
12 changed files with 66 additions and 57 deletions
|
|
@ -141,9 +141,5 @@ func validateCreateAccount(form *apimodel.AccountCreateRequest) error {
|
|||
return err
|
||||
}
|
||||
|
||||
if err := validate.SignUpReason(form.Reason, config.GetAccountsReasonRequired()); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return validate.SignUpReason(form.Reason, config.GetAccountsReasonRequired())
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,7 +117,8 @@ func ErrorHandler(c *gin.Context, errWithCode gtserror.WithCode, instanceGet fun
|
|||
// or if we should just use a json. Normally we would want to
|
||||
// check for a returned error, but if an error occurs here we
|
||||
// can just fall back to default behavior (serve json error).
|
||||
accept, _ := NegotiateAccept(c, JSONOrHTMLAcceptHeaders...)
|
||||
// Prefer provided offers, fall back to JSON or HTML.
|
||||
accept, _ := NegotiateAccept(c, append(offers, JSONOrHTMLAcceptHeaders...)...)
|
||||
|
||||
if errWithCode.Code() == http.StatusNotFound {
|
||||
// Use our special not found handler with useful status text.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue