新增七牛回调接口并接入验签校验
This commit is contained in:
@@ -6,6 +6,11 @@ import (
|
||||
qiniuhandler "wx_service/internal/common/qiniu/handler"
|
||||
)
|
||||
|
||||
func registerCommonPublicRoutes(api *gin.RouterGroup, uploadHandler *qiniuhandler.UploadHandler) {
|
||||
// 七牛上传回调:由七牛服务端调用,不能挂登录鉴权。
|
||||
api.POST("/common/upload/qiniu/callback", uploadHandler.QiniuCallback)
|
||||
}
|
||||
|
||||
func registerCommonRoutes(protected *gin.RouterGroup, uploadHandler *qiniuhandler.UploadHandler) {
|
||||
// 公共接口(所有小程序共用)
|
||||
common := protected.Group("/common")
|
||||
|
||||
@@ -39,6 +39,7 @@ func Register(
|
||||
|
||||
// 公众号网页授权:不需要登录(code 本身来自微信授权回调)
|
||||
registerWeChatOfficialRoutes(api, oaOAuthHandler)
|
||||
registerCommonPublicRoutes(api, uploadHandler)
|
||||
|
||||
if lawyerHandler != nil {
|
||||
api.POST("/lawyers", lawyerHandler.Create)
|
||||
|
||||
Reference in New Issue
Block a user