chore: Migrate /superset/stop_query/ to API v1 (#22624)

This commit is contained in:
Diego Medina
2023-01-16 11:07:52 -03:00
committed by GitHub
parent 80b31130b4
commit 3ed288d4ee
11 changed files with 1189 additions and 446 deletions

View File

@@ -450,9 +450,9 @@ export function validateQuery(queryEditor, sql) {
export function postStopQuery(query) {
return function (dispatch) {
return SupersetClient.post({
endpoint: '/superset/stop_query/',
postPayload: { client_id: query.id },
stringify: false,
endpoint: '/api/v1/query/stop',
body: JSON.stringify({ client_id: query.id }),
headers: { 'Content-Type': 'application/json' },
})
.then(() => dispatch(stopQuery(query)))
.then(() => dispatch(addSuccessToast(t('Query was stopped.'))))