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