mirror of
https://github.com/go-nunu/nunu-layout-advanced.git
synced 2025-09-26 20:41:33 +08:00
fix: rm HandleError ErrSuccess
This commit is contained in:
@@ -28,7 +28,7 @@ func HandleError(ctx *gin.Context, httpCode int, err error, data interface{}) {
|
||||
data = map[string]string{}
|
||||
}
|
||||
resp := Response{Code: errorCodeMap[err], Message: err.Error(), Data: data}
|
||||
if _, ok := errorCodeMap[ErrSuccess]; !ok {
|
||||
if _, ok := errorCodeMap[err]; !ok {
|
||||
resp = Response{Code: 500, Message: "unknown error", Data: data}
|
||||
}
|
||||
ctx.JSON(httpCode, resp)
|
||||
|
Reference in New Issue
Block a user