ktmud commented on a change in pull request #12230:
URL: https://github.com/apache/superset/pull/12230#discussion_r552250794



##########
File path: superset-frontend/src/SqlLab/components/ResultSet.tsx
##########
@@ -40,6 +46,29 @@ import { exploreChart } from '../../explore/exploreUtils';
 import { CtasEnum } from '../actions/sqlLab';
 import { Query } from '../types';
 
+const updateDatset = async (
+  datasetId: number,
+  dbId: number,
+  sql: string,
+  columns: Array<Record<string, any>>,
+  overrideColumns: boolean,
+) => {
+  const endpoint = 
`api/v1/dataset/${datasetId}?override_columns=${overrideColumns}`;
+  const headers = { 'Content-Type': 'application/json' };
+  const body = JSON.stringify({
+    sql,
+    columns,
+    database_id: dbId,
+  });
+
+  const data: JsonResponse = await SupersetClient.put({

Review comment:
       +1 on migrating this to `makeApi` in this PR. It handles the content 
type for you.




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

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to