File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -286,7 +286,7 @@ export const createHook = ({
286
286
287
287
const hasRequestBodyArrray = requestBodyComponent && requestBodyComponent . includes ( '[]' ) ;
288
288
const body = hasRequestBodyArrray ? `{body: ${ requestBodyComponent } }` : `${ requestBodyComponent } ` ;
289
- const bodyProps = hasRequestBodyArrray ? `{body, ...props}` : '{ props} ' ;
289
+ const bodyProps = hasRequestBodyArrray ? `{body, ...props}` : 'props' ;
290
290
291
291
const generateProps = ( props : ParameterObject [ ] ) => {
292
292
return props . map ( ( item ) => `["${ item . name } "]: props["${ item . name } "]` ) . join ( ',' ) ;
@@ -431,7 +431,6 @@ export const createHook = ({
431
431
${ headerParam }
432
432
${ paramsTypes }
433
433
};
434
-
435
434
const ${ fetchName } = async (${ bodyProps } : ${ componentName } Params) => {
436
435
${ generateBodyProps ( ) }
437
436
const headers = {${ generateProps ( header ) } }
@@ -448,7 +447,7 @@ export const createHook = ({
448
447
${ headerParam }
449
448
${ paramsTypes }
450
449
};
451
-
450
+ // TEST1
452
451
const ${ fetchName } = async (${ bodyProps } : ${ componentName } Params) => {
453
452
${ generateBodyProps ( ) }
454
453
const result = await api.${ verb } <${ responseTypes } >(\`${ route . replace ( / \{ / g, '{props.' ) } \`, body)
You can’t perform that action at this time.
0 commit comments