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

return 500 when POST /api/meta/dataset fails

parent fc476a13
Branches
Tags
No related merge requests found
......@@ -11,7 +11,9 @@
"Execute an MQL query and retrieve the results as JSON."
[:as {{:keys [database] :as body} :body}]
(read-check Database database)
(driver/dataset-query body {:executed_by *current-user-id*}))
(let [{:keys [status] :as response} (driver/dataset-query body {:executed_by *current-user-id*})]
{:status (if (= status :completed) 200 500)
:body response}))
(defendpoint GET "/csv"
"Execute an MQL query and download the result data as a CSV file."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment