feat: add updated_at to modpacks and /api/launcher/modpacks/summary endpoint
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user