wip: jwt
This commit is contained in:
@ -2,13 +2,14 @@ package api
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/go-playground/validator/v10"
|
||||
"loveuer/utodo/internal/handler"
|
||||
"loveuer/utodo/internal/opt"
|
||||
g_handler "loveuer/utodo/pkg/handler"
|
||||
"loveuer/utodo/pkg/middleware/logger"
|
||||
"loveuer/utodo/pkg/middleware/trace"
|
||||
|
||||
"github.com/go-playground/validator/v10"
|
||||
|
||||
"github.com/gofiber/fiber/v3"
|
||||
r3 "github.com/gofiber/fiber/v3/middleware/recover"
|
||||
)
|
||||
@ -29,13 +30,14 @@ func New(ctx context.Context) *fiber.App {
|
||||
app.Use(trace.New())
|
||||
// app.Use(l3.New())
|
||||
app.Use(logger.New())
|
||||
app.Use(r3.New())
|
||||
app.Use(r3.New(r3.Config{EnableStackTrace: true}))
|
||||
|
||||
app.Get("/healthz", g_handler.Healthz(opt.Cfg.Name, opt.Cfg.Version))
|
||||
|
||||
{
|
||||
api := app.Group("/api/v1/auth")
|
||||
api.Post("/login", handler.Login())
|
||||
api.Post("/verify", handler.Verify(""))
|
||||
}
|
||||
|
||||
return app
|
||||
|
Reference in New Issue
Block a user