Skip to content

Commit 2470eb8

Browse files
committed
🐛 Enable the description field on Generators
Follow-up: #2482, #2499 Ref: konveyor/tackle2-hub#860 Enable saving the description field when Creating/Updating Generators Signed-off-by: Scott J Dickerson <[email protected]>
1 parent 362f945 commit 2470eb8

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

client/src/app/api/rest/generators.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,14 @@ export const getGeneratorById = (id: number | string) =>
1313

1414
// success with code 201 and created entity as response data
1515
export const createGenerator = (generator: New<Generator>) => {
16-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
17-
const { description, ...generatorWithoutDescription } = generator; //TODO: Remove this when the backend is updated with description support
1816
return axios
19-
.post<Generator>(ASSET_GENERATORS, generatorWithoutDescription)
17+
.post<Generator>(ASSET_GENERATORS, generator)
2018
.then((res) => res.data);
2119
};
2220

2321
// success with code 204 and therefore no response content
2422
export const updateGenerator = (generator: Generator) => {
25-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
26-
const { description, ...generatorWithoutDescription } = generator; //TODO: Remove this when the backend is updated with description support
27-
return axios.put<void>(
28-
`${ASSET_GENERATORS}/${generator.id}`,
29-
generatorWithoutDescription
30-
);
23+
return axios.put<void>(`${ASSET_GENERATORS}/${generator.id}`, generator);
3124
};
3225

3326
// success with code 204 and therefore no response content

0 commit comments

Comments
 (0)