fix: return code and message to FE issue
This commit is contained in:
@@ -6,7 +6,7 @@ const (
|
||||
)
|
||||
|
||||
func ErrResp(msg string) map[string]any {
|
||||
return map[string]any{"code": CODE_FAIL, "message": msg}
|
||||
return map[string]any{"code": CODE_FAIL, "msg": msg}
|
||||
}
|
||||
|
||||
func DataResp(data any) map[string]any {
|
||||
@@ -14,7 +14,7 @@ func DataResp(data any) map[string]any {
|
||||
}
|
||||
|
||||
func SuccMessageResp() map[string]any {
|
||||
return map[string]any{"code": CODE_SUCC, "message": "success"}
|
||||
return map[string]any{"code": CODE_SUCC, "msg": "success"}
|
||||
}
|
||||
|
||||
func TotalResp(total int64) map[string]any {
|
||||
|
||||
Reference in New Issue
Block a user