Skip to content
Snippets Groups Projects
Commit c4e45968 authored by Cam Saul's avatar Cam Saul
Browse files

Fix POST /api/dataset/csv endpoint :wrench:

parent de561d3e
Branches
Tags
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.
Please register or to comment