feat: add auth flow and login guard for api/web
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user