فهرست منبع

调整企微回调URL参数tag,兼容kratos框架 (#855)

* fix: handle JSON parse error when API returns binary file instead of error JSON

* fix: add JSON tags to SignatureOptions struct fields for proper serialization

* fix: mod module

* fix: rollback

---------

Co-authored-by: tax <jia_deng@intsig.net>
zhangjiani 9 ماه پیش
والد
کامیت
c136b878ce
1فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 4 4
      work/kf/callback.go

+ 4 - 4
work/kf/callback.go

@@ -8,10 +8,10 @@ import (
 
 // SignatureOptions 微信服务器验证参数
 type SignatureOptions struct {
-	Signature string `form:"msg_signature"`
-	TimeStamp string `form:"timestamp"`
-	Nonce     string `form:"nonce"`
-	EchoStr   string `form:"echostr"`
+	Signature string `form:"msg_signature" json:"msg_signature"`
+	TimeStamp string `form:"timestamp" json:"timestamp"`
+	Nonce     string `form:"nonce" json:"nonce"`
+	EchoStr   string `form:"echostr" json:"echostr"`
 }
 
 // VerifyURL 验证请求参数是否合法并返回解密后的消息内容