forked from mtusi2026/mtusi2026lab4
feat: two-store reconciler with safe repair and cost measurement (grade 5, track 2)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user