优化请求成功默认返回文案

This commit is contained in:
zhangdeman committed 2025-02-07 17:17:24 +08:00
1 parent 907c206627
commit ca151fbc1f
1 file changed
+3
+3
View File
@@ -118,6 +118,9 @@ func MessageWithoutCode() {
func getMessage(code any, defaultMessage ...string) string { func getMessage(code any, defaultMessage ...string) string {
inputCodeInfo, exist := codeTable[code] inputCodeInfo, exist := codeTable[code]
if !exist { if !exist {
if fmt.Sprintf("%v", code) == fmt.Sprintf("%v", defaultSuccessCode) {
return "请求成功"
}
if len(defaultMessage) > 0 && len(defaultMessage[0]) > 0 { if len(defaultMessage) > 0 && len(defaultMessage[0]) > 0 {
return defaultMessage[0] return defaultMessage[0]
} }
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.