refactor: extract auth into feature domain

This commit is contained in:
2026-04-06 22:34:49 +02:00
parent caa2247b89
commit 376b6f6418
6 changed files with 202 additions and 5 deletions

View File

@@ -3,8 +3,8 @@ package server
import (
"net/http"
"malago/internal/auth"
"malago/internal/database"
"malago/internal/features/auth"
"malago/internal/handlers"
"malago/internal/jikan"
"malago/internal/middleware"
@@ -19,7 +19,7 @@ type Config struct {
func NewRouter(cfg Config) http.Handler {
mux := http.NewServeMux()
authHandler := handlers.NewAuthHandler(cfg.AuthService)
authHandler := auth.NewHandler(cfg.AuthService)
watchlistHandler := handlers.NewWatchlistHandler(cfg.DB)
animeHandler := handlers.NewAnimeHandler(cfg.JikanClient, cfg.DB)