feat: two-store reconciler with safe repair and cost measurement (grade 5, track 2)

This commit is contained in:
2026-11-20 05:01:20 +03:00
parent 1c3011bf28
commit 60e8f4474b
36 changed files with 807 additions and 212 deletions
+7 -1
View File
@@ -53,7 +53,13 @@ func (h *Handler) DownloadAttachment(w http.ResponseWriter, r *http.Request) {
h.fail(w, r, err)
return
}
attachment, content, err := h.attachments.Open(r.Context(), actor(r), id, r.URL.Query().Get("variant"))
query := r.URL.Query()
variant := query.Get("variant")
if query.Has("variant") && variant == "" {
h.fail(w, r, badRequest("variant must be original"))
return
}
attachment, content, err := h.attachments.Open(r.Context(), actor(r), id, variant)
if err != nil {
h.fail(w, r, err)
return