feat: complete
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"backend/modules/medias"
|
||||
"backend/modules/middlewares"
|
||||
"backend/modules/users"
|
||||
wechatModule "backend/modules/wechat"
|
||||
"backend/providers/app"
|
||||
"backend/providers/hashids"
|
||||
"backend/providers/http"
|
||||
@@ -46,6 +47,7 @@ func Command() atom.Option {
|
||||
middlewares.Provide,
|
||||
users.Provide,
|
||||
medias.Provide,
|
||||
wechatModule.Provide,
|
||||
)),
|
||||
)
|
||||
}
|
||||
@@ -55,6 +57,7 @@ type Http struct {
|
||||
|
||||
App *app.Config
|
||||
Storage *storage.Config
|
||||
Wechat *wechatModule.Controller
|
||||
Service *http.Service
|
||||
Initials []contracts.Initial `group:"initials"`
|
||||
Routes []contracts.HttpRoute `group:"routes"`
|
||||
@@ -73,7 +76,7 @@ func Serve(cmd *cobra.Command, args []string) error {
|
||||
engine.Use(mid.ProcessResponse)
|
||||
engine.Use(mid.WeChatVerify)
|
||||
|
||||
engine.Use("/t+", mid.WeChatAuthUserInfo, mid.WeChatSilentAuth)
|
||||
engine.Use([]string{"/t/:tenant", "/t/:tenant/*"}, mid.WeChatAuth, http.Wechat.Render)
|
||||
|
||||
http.Service.Engine.Use(favicon.New(favicon.Config{
|
||||
Data: []byte{},
|
||||
|
||||
Reference in New Issue
Block a user