套餐查询提供状态筛选字段;实名认证回调结果提供页面
This commit is contained in:
@@ -2,8 +2,10 @@ package web
|
||||
|
||||
import (
|
||||
"context"
|
||||
"embed"
|
||||
"fmt"
|
||||
"log/slog"
|
||||
"net/http"
|
||||
_ "net/http/pprof"
|
||||
"platform/web/events"
|
||||
deps "platform/web/globals"
|
||||
@@ -11,6 +13,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/template/html/v2"
|
||||
"github.com/hibiken/asynq"
|
||||
"golang.org/x/sync/errgroup"
|
||||
)
|
||||
@@ -42,11 +45,15 @@ func RunApp(pCtx context.Context) error {
|
||||
return g.Wait()
|
||||
}
|
||||
|
||||
//go:embed views/*.html
|
||||
var fs embed.FS
|
||||
|
||||
func RunWeb(ctx context.Context) error {
|
||||
|
||||
fiber := fiber.New(fiber.Config{
|
||||
ProxyHeader: fiber.HeaderXForwardedFor,
|
||||
ErrorHandler: ErrorHandler,
|
||||
Views: html.NewFileSystem(http.FS(fs), ".html"),
|
||||
})
|
||||
|
||||
ApplyMiddlewares(fiber)
|
||||
|
||||
Reference in New Issue
Block a user