File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -13,21 +13,14 @@ export const getGeneratorById = (id: number | string) =>
13
13
14
14
// success with code 201 and created entity as response data
15
15
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
18
16
return axios
19
- . post < Generator > ( ASSET_GENERATORS , generatorWithoutDescription )
17
+ . post < Generator > ( ASSET_GENERATORS , generator )
20
18
. then ( ( res ) => res . data ) ;
21
19
} ;
22
20
23
21
// success with code 204 and therefore no response content
24
22
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 ) ;
31
24
} ;
32
25
33
26
// success with code 204 and therefore no response content
You can’t perform that action at this time.
0 commit comments