fixed json

This commit is contained in:
ston1th 2021-11-08 00:47:09 +01:00
commit f657bbbf28
2 changed files with 16 additions and 1 deletions

View file

@ -123,7 +123,7 @@ func (c *Context) JSON(v interface{}) {
// Err is a HTTPErr wrapper for the custom Error type
func (c *Context) Err(err Error) {
c.HTTPErr(err.Error(), err.Status())
c.HTTPErr(err.JSON(), err.Status())
}
// HTTPErr is a http.Error wrapper