feat: optimized-error-handling&remove unused constant

This commit is contained in:
markwang committed 2024-03-15 14:38:10 +08:00
1 parent 179704187b
commit 6053598a03
19 files changed
+33 -251

No files matched your search

+2 -5
View File
@@ -100,11 +100,8 @@ func (ctx *Context) GetPreCodeContext(stdCtx context.Context) (string, error) {
var ret struct {
PreCode string `json:"pre_auth_code"`
}
if err := json.Unmarshal(body, &ret); err != nil {
return "", err
}
return ret.PreCode, nil
err = json.Unmarshal(body, &ret)
return ret.PreCode, err
}
// GetPreCode 获取预授权码