Skip to content

Commit

Permalink
Fixed code reviews, updated transformationResult import
Browse files Browse the repository at this point in the history
  • Loading branch information
punith300i committed Oct 28, 2023
1 parent 48013d1 commit 8bc1f0a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion www/src/models/transformation/TransformationStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class TransformationStore extends SimpleCRUDStore<number, Transformation>

async testTransformation(id: number, payload: Transformation): Promise<TransformationResult[] | undefined> {
let resp: any = await axios
.post(`${SERVER}/api/transform/1/transformations`, payload)
.post(`${SERVER}/api/transform/${id}/transformations`, payload)
.then((res) => res.data)
.catch((error) => this.filterErrorMessage(error.response.data.message));
return resp;
Expand Down
6 changes: 3 additions & 3 deletions www/src/pages/table/forms/TransformationForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { observer } from "mobx-react";
import { ActionType } from "@ant-design/pro-table";
import { useRef, useState } from "react";
import Editor from "@monaco-editor/react";
import { TransformationTable, useStores } from "../../../models";
import { TransformationResult, useStores } from "../../../models";
import {
Transformation
} from "../../../models/transformation/TransformationStore";
Expand All @@ -39,7 +39,7 @@ export const TransformationForm = withStyles(styles)(
const actionRef = useRef<ActionType>();
const [form] = Form.useForm();
const { transformationStore } = useStores();
const [result, setResult] = useState<TransformationTable[] | undefined>();
const [result, setResult] = useState<TransformationResult[] | undefined>();

const columns = [
{ dataIndex: "row_id", title: "Row ID" },
Expand Down Expand Up @@ -268,7 +268,7 @@ export const CustomEditor = ({
</div>
);
}
function table2row(tbl: TransformationTable) {
function table2row(tbl: TransformationResult) {
return {
key: tbl.path,
row_id: tbl.path + 1,
Expand Down

0 comments on commit 8bc1f0a

Please sign in to comment.