feat(launcher): implement modpack manifest API endpoint

This commit is contained in:
2025-06-18 13:16:57 +03:00
parent ca182d6d6f
commit a157fc1cc3
4 changed files with 84 additions and 1 deletions

View File

@@ -26,6 +26,7 @@ func main() {
serverPoller := &core.ServerPoller{Repo: serverRepo}
modpackHandler := &api.ModpackHandler{ModpackRepo: modpackRepo}
launcherHandler := &api.LauncherHandler{ModpackRepo: modpackRepo}
// Запускаем поллер в фоновой горутине
go serverPoller.Start(context.Background())
@@ -69,6 +70,9 @@ func main() {
r.Post("/join", authHandler.Join)
r.Get("/profile/{uuid}", profileHandler.GetProfile)
})
r.Route("/launcher", func(r chi.Router) {
r.Get("/modpacks/{name}/manifest", launcherHandler.GetModpackManifest)
})
// --- Защищенные роуты ---
r.Group(func(r chi.Router) {