Skip to content

Commit d63b1e7

Browse files
committed
feat: Always include options argument
1 parent c26f6a2 commit d63b1e7

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

codegen/layouts/partials/route-class-endpoint.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{methodName}}(
22
{{methodParamName}}{{#if isOptionalParamsOk}}?{{/if}}: {{requestTypeName}},
3-
{{#if hasOptions}}options: {{optionsTypeName}} = {},{{/if}}
3+
options: {{optionsTypeName}} = {},
44
): SeamHttpRequest<{{#if returnsVoid}}void, undefined{{else}}{{responseTypeName}}, '{{responseKey}}'{{/if}}>
55
{
66
{{#if isUndocumented}}
@@ -13,6 +13,6 @@
1313
method: '{{method}}',
1414
{{requestFormat}}: {{methodParamName}},
1515
responseKey: {{#if returnsVoid}}undefined{{else}}'{{responseKey}}'{{/if}},
16-
{{#if hasOptions}}options,{{/if}}
16+
options,
1717
})
1818
}

codegen/lib/layouts/route.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ export interface EndpointLayoutContext {
2020
functionName: string
2121
className: string
2222
method: Method
23-
hasOptions: boolean
2423
responseKey: string
2524
methodParamName: 'params' | 'body'
2625
requestFormat: 'params' | 'body'
@@ -104,7 +103,6 @@ export const getEndpointLayoutContext = (
104103
methodName,
105104
functionName: camelCase(prefix),
106105
method: endpoint.request.preferredMethod,
107-
hasOptions: returnsActionAttempt,
108106
className: getClassName(route.path),
109107
methodParamName,
110108
requestFormat,

0 commit comments

Comments
 (0)