修复检查证书文件是否存在失败的bug

This commit is contained in:
wsczx
2023-04-07 23:59:44 +08:00
parent 5dc8114167
commit 19e99b7648
2 changed files with 7 additions and 4 deletions

View File

@@ -69,8 +69,7 @@ func CreatCert(w http.ResponseWriter, r *http.Request) {
}
defer r.Body.Close()
config := &dbdata.SettingLetsEncrypt{}
err = json.Unmarshal(body, config)
if err != nil {
if err := json.Unmarshal(body, config); err != nil {
RespError(w, RespInternalErr, err)
return
}