change router struct

This commit is contained in:
2025-06-17 10:49:53 +08:00
parent a8bc73ae99
commit 6c3b4ec367
42 changed files with 1268 additions and 1308 deletions

View File

@@ -0,0 +1,25 @@
package loginlog
import (
v1 "management/internal/erpserver/service/v1"
"management/internal/pkg/render"
"management/internal/pkg/session"
"github.com/go-chi/chi/v5"
)
type Config struct {
Sm session.Manager
Render render.Renderer
MenuService v1.MenuService
LoginLogService v1.LoginLogService
}
func Routes(r chi.Router, cfg Config) {
app := NewApp(cfg.Render, cfg.LoginLogService)
r.Route("/login_log", func(r chi.Router) {
r.Get("/list", app.list)
r.Post("/list", app.list)
})
}