You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "jfrag1 (via GitHub)" <gi...@apache.org> on 2023/06/20 17:19:38 UTC

[GitHub] [superset] jfrag1 commented on a diff in pull request #24434: fix: Revert to old endpoint temporarily to enable sharing saved queries

jfrag1 commented on code in PR #24434:
URL: https://github.com/apache/superset/pull/24434#discussion_r1235575992


##########
superset-frontend/src/SqlLab/actions/sqlLab.js:
##########
@@ -1372,12 +1372,11 @@ export function popStoredQuery(urlId) {
 export function popSavedQuery(saveQueryId) {
   return function (dispatch) {
     return SupersetClient.get({
-      endpoint: `/api/v1/saved_query/${saveQueryId}`,
+      endpoint: `/savedqueryviewapi/api/get/${saveQueryId}`,

Review Comment:
   @john-bodley The main reason I did it this way is that I'm pretty sure there are sevaral FAB-generated endpoints under the `SavedQueryRestApi` that utilize the `SavedQueryFilter` (set as the `base_filter` on the class), and I didn't want to change the behavior for those.  For example, the endpoint that fetches a list of a user's saved queries could start returning a list of all saved queries with that change.



##########
superset-frontend/src/SqlLab/actions/sqlLab.js:
##########
@@ -1372,12 +1372,11 @@ export function popStoredQuery(urlId) {
 export function popSavedQuery(saveQueryId) {
   return function (dispatch) {
     return SupersetClient.get({
-      endpoint: `/api/v1/saved_query/${saveQueryId}`,
+      endpoint: `/savedqueryviewapi/api/get/${saveQueryId}`,

Review Comment:
   @john-bodley The main reason I did it this way is that I'm pretty sure there are several FAB-generated endpoints under the `SavedQueryRestApi` that utilize the `SavedQueryFilter` (set as the `base_filter` on the class), and I didn't want to change the behavior for those.  For example, the endpoint that fetches a list of a user's saved queries could start returning a list of all saved queries with that change.



-- 
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