Skip to content

Commit

Permalink
Update getDatasetFromFile endpoint to SST (#1003)
Browse files Browse the repository at this point in the history
  • Loading branch information
noah-iversen authored Oct 2, 2023
1 parent d05ee5b commit 171c31d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions frontend/src/features/Train/redux/trainspaceApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,12 @@ const trainspaceApi = backendApi
message: string;
};
const getObjUrl = getObj.data;
const formData = new FormData();
formData.append("file", file);
const uploadQuery = fetchBaseQuery();
const response = await uploadQuery(
{
url: getObjUrl,
method: "PUT",
body: formData,
body: file,
},
_,
__
Expand All @@ -78,7 +76,7 @@ const trainspaceApi = backendApi
query: ({ dataSource, dataset }) => ({
url: dataset.isDefaultDataset
? `/api/training/datasets/default/${dataset.name}/columns`
: "/api/dataset/getColumnsFromDatasetFile",
: `/api/lambda/datasets/user/${dataSource}/${dataset.name}/columns`,
method: "GET",
/*body: {
data_source: dataSource.toLowerCase(),
Expand Down

0 comments on commit 171c31d

Please sign in to comment.