feat: simplify api error message
This commit is contained in:
parent
dec695f0e2
commit
a1f09bafcc
|
@ -21,7 +21,7 @@ type Error struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *Error) Error() string {
|
func (e *Error) Error() string {
|
||||||
return fmt.Sprintf("%s: %v", e.Code, e.Data)
|
return fmt.Sprintf("api-error: %s", e.Code)
|
||||||
}
|
}
|
||||||
|
|
||||||
func DataResponse(w http.ResponseWriter, status int, data interface{}) {
|
func DataResponse(w http.ResponseWriter, status int, data interface{}) {
|
||||||
|
|
Loading…
Reference in New Issue