feat: add updated_at to modpacks and /api/launcher/modpacks/summary endpoint

This commit is contained in:
2026-01-04 14:38:21 +03:00
parent e98d10ae1d
commit 275c1f2d50
4 changed files with 45 additions and 0 deletions

View File

@@ -35,3 +35,15 @@ func (h *LauncherHandler) GetModpackManifest(w http.ResponseWriter, r *http.Requ
w.WriteHeader(http.StatusOK)
json.NewEncoder(w).Encode(manifest)
}
func (h *LauncherHandler) GetModpacksSummary(w http.ResponseWriter, r *http.Request) {
summaries, err := h.ModpackRepo.GetModpacksSummary(r.Context())
if err != nil {
http.Error(w, "Failed to get modpacks summary", http.StatusInternalServerError)
return
}
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(http.StatusOK)
json.NewEncoder(w).Encode(summaries)
}