You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/10/07 06:43:26 UTC

[GitHub] [superset] villebro commented on a diff in pull request #21682: feat(sqllab): save query parameters in database

villebro commented on code in PR #21682:
URL: https://github.com/apache/superset/pull/21682#discussion_r989731420


##########
superset-frontend/src/SqlLab/actions/sqlLab.js:
##########
@@ -926,21 +932,26 @@ export function queryEditorSetTitle(queryEditor, name) {
   };
 }
 
-export function saveQuery(query) {
+export function saveQuery(query, clientId) {
+  const { id, ...payload } = convertQueryToServer(query);
+
   return dispatch =>
     SupersetClient.post({
-      endpoint: '/savedqueryviewapi/api/create',
-      postPayload: convertQueryToServer(query),
-      stringify: false,
+      endpoint: '/api/v1/saved_query/',
+      jsonPayload: convertQueryToServer(payload),

Review Comment:
   I love the migration to v1 API! 🚀 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org