fix: return code and message to FE issue
This commit is contained in:
1 parent
9a14520da6
commit
c4533da0e0
3 files changed
+7
-7
No files matched your search
@@ -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