fix: return code and message to FE issue

This commit is contained in:
2024-09-09 17:19:50 +08:00
parent 9a14520da6
commit c4533da0e0
3 changed files with 7 additions and 7 deletions

View File

@@ -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 {