feat: add wxshare
This commit is contained in:
21
backend/app/http/wechats.go
Normal file
21
backend/app/http/wechats.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package http
|
||||
|
||||
import (
|
||||
"quyun/database/schemas/public/model"
|
||||
"quyun/providers/wechat"
|
||||
|
||||
"github.com/gofiber/fiber/v3"
|
||||
)
|
||||
|
||||
// @provider
|
||||
type wechats struct {
|
||||
wechat *wechat.Client
|
||||
}
|
||||
|
||||
// GetJsSDK
|
||||
// @Router /wechats/js-sdk [get]
|
||||
// @Bind url query
|
||||
// @Bind user local
|
||||
func (ctl *wechats) GetJsSDK(ctx fiber.Ctx, url string, user *model.Users) (*wechat.JsSDK, error) {
|
||||
return ctl.wechat.GetJsSDK(user.AuthToken.Data.StableAccessToken, url)
|
||||
}
|
||||
Reference in New Issue
Block a user