fix: issues
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package http
|
||||
|
||||
import (
|
||||
"path/filepath"
|
||||
|
||||
"backend/modules/medias"
|
||||
"backend/modules/middlewares"
|
||||
"backend/modules/users"
|
||||
@@ -15,7 +17,6 @@ import (
|
||||
"git.ipao.vip/rogeecn/atom"
|
||||
"git.ipao.vip/rogeecn/atom/container"
|
||||
"git.ipao.vip/rogeecn/atom/contracts"
|
||||
"github.com/gofiber/fiber/v3"
|
||||
"github.com/gofiber/fiber/v3/middleware/favicon"
|
||||
"github.com/gofiber/fiber/v3/middleware/static"
|
||||
log "github.com/sirupsen/logrus"
|
||||
@@ -70,21 +71,19 @@ func Serve(cmd *cobra.Command, args []string) error {
|
||||
|
||||
engine.Use(mid.DebugMode)
|
||||
engine.Use(mid.ProcessResponse)
|
||||
engine.Use(mid.WeChatVerify)
|
||||
|
||||
wechatGroup := engine.Group("/t")
|
||||
wechatGroup.Use(mid.WeChatVerify)
|
||||
wechatGroup.Use(mid.WeChatAuthUserInfo)
|
||||
wechatGroup.Use(mid.WeChatSilentAuth)
|
||||
wechatGroup.Get("*", func(c fiber.Ctx) error {
|
||||
return c.SendString("ok")
|
||||
})
|
||||
engine.Use("/t+", mid.WeChatAuthUserInfo, mid.WeChatSilentAuth)
|
||||
|
||||
http.Service.Engine.Use(favicon.New(favicon.Config{
|
||||
Data: []byte{},
|
||||
}))
|
||||
|
||||
http.Service.Engine.Use("/static", static.New(http.Storage.Path, static.Config{
|
||||
Browse: true,
|
||||
Browse: http.App.IsDevMode(),
|
||||
}))
|
||||
http.Service.Engine.Use("/assets", static.New(filepath.Join(http.Storage.Asset, "assets"), static.Config{
|
||||
Browse: http.App.IsDevMode(),
|
||||
}))
|
||||
|
||||
group := http.Service.Engine.Group("/v1")
|
||||
|
||||
Reference in New Issue
Block a user