package fiber import ( "github.com/gofiber/fiber/v2" "git.dmitriygnatenko.ru/dima/dmitriygnatenko-v2/internal/services/handler" ) func initPublicHandlers(app *fiber.App, sp ServiceProvider) { mainPageHandler := handler.NewMainPageHandler( sp.CacheService(), sp.ArticleRepository(), ) app.Get("/:lang", mainPageHandler) app.Get("/", mainPageHandler) tagPageHandler := handler.NewTagPageHandler( sp.CacheService(), sp.ArticleRepository(), sp.TagRepository(), ) app.Get("/:lang/tag/:tag", tagPageHandler) app.Get("/tag/:tag", tagPageHandler) articlePageHandler := handler.NewArticlePageHandler( sp.CacheService(), sp.ArticleRepository(), sp.TagRepository(), ) app.Get("/:lang/article/:article", articlePageHandler) app.Get("/article/:article", articlePageHandler) }