Skip to content
Snippets Groups Projects
Commit 034693a4 authored by Cam Saül's avatar Cam Saül Committed by GitHub
Browse files

Merge pull request #3776 from metabase/fix-query-csv-endpoint

Fix POST /api/dataset/csv endpoint :wrench:
parents de561d3e c4e45968
No related branches found
No related tags found
No related merge requests found
......@@ -69,8 +69,9 @@
"Execute a query and download the result data as a CSV file."
[query]
{query su/JSONString}
(read-check Database (:database query))
(as-csv (qp/dataset-query (json/parse-string query keyword) {:executed-by *current-user-id*})))
(let [query (json/parse-string query keyword)]
(read-check Database (:database query))
(as-csv (qp/dataset-query query {:executed-by *current-user-id*}))))
(define-routes)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment