feat: add auth flow and login guard for api/web

This commit is contained in:
2026-02-27 11:07:25 +08:00
parent f2a1e2d6fe
commit 60ce70f532
15 changed files with 377 additions and 11 deletions

View File

@@ -32,8 +32,10 @@ func New(configPath string) (*App, error) {
}
wordService := service.NewWordService(db)
authService := service.NewAuthService(db)
wordHandler := handler.NewWordHandler(wordService)
engine := router.New(wordHandler)
authHandler := handler.NewAuthHandler(authService)
engine := router.New(wordHandler, authHandler)
return &App{
engine: engine,