feat: add updated_at to modpacks and /api/launcher/modpacks/summary endpoint
This commit is contained in:
1 parent
e98d10ae1d
commit
275c1f2d50
4 files changed
+45
No files matched your search
@@ -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