Simplify error handling codes

Signed-off-by: Yuan Si <do4suki@gmail.com>
This commit is contained in:
2023-04-11 13:08:06 +08:00
parent 8f1aa59e67
commit 497b3adba2
28 changed files with 195 additions and 548 deletions
+1 -3
View File
@@ -74,9 +74,7 @@ func PersonalNoticeHandler(ctx *gin.Context) {
StatusCode: 200,
}
resp, err := json.Marshal(noticeResp)
if err != nil {
panic(err)
}
CheckErr(err)
xms := encrypt.RSA_Sign_SHA1(resp, "privatekey.pem")
xms64 := base64.RawStdEncoding.EncodeToString(xms)