Fix content header

This commit is contained in:
2026-02-25 22:11:14 -08:00
parent 81e80c77cd
commit c2babd739a

View File

@@ -13,5 +13,6 @@ get "/deck_xml" do
api_url = "https://api2.moxfield.com/v3/decks/all/" + deck_id
content = HTTP.headers({"User-Agent" => USER_AGENT, 'Accept' => 'application/json'}).get(api_url)
puts content
JSON.parse(content).to_xml(:root => :deck)
xml_data = JSON.parse(content).to_xml(:root => :deck)
[200, {"Content-Type" => "application/xml"}, xml_data]
end