Skip to content

Commit d73dfab

Browse files
committed
lint
1 parent ef6033a commit d73dfab

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

src/static/helpers/customApi.ts

+8-7
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,18 @@ export const callCustomEndpoint = async (
6565
}
6666
});
6767

68-
const defaultBaseUri = 'https://{shortCode}.api.commercecloud.salesforce.com/custom/{apiName}/{apiVersion}'
69-
let clientConfigCopy = clientConfig
70-
71-
if(!clientConfig.baseUri || !clientConfig.parameters?.apiVersion) {
68+
const defaultBaseUri =
69+
'https://{shortCode}.api.commercecloud.salesforce.com/custom/{apiName}/{apiVersion}';
70+
let clientConfigCopy = clientConfig;
71+
72+
if (!clientConfig.baseUri || !clientConfig.parameters?.apiVersion) {
7273
clientConfigCopy = {
7374
...clientConfig,
74-
...(!clientConfig.baseUri && { baseUri: defaultBaseUri }),
75+
...(!clientConfig.baseUri && {baseUri: defaultBaseUri}),
7576
parameters: {
7677
...clientConfig.parameters,
77-
...(!clientConfig.parameters?.apiVersion && { apiVersion: 'v1' })
78-
}
78+
...(!clientConfig.parameters?.apiVersion && {apiVersion: 'v1'}),
79+
},
7980
};
8081
}
8182

src/static/helpers/fetchHelper.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ export const doFetch = async <Params extends BaseUriParameters>(
4646
const requestOptions: FetchOptions = {
4747
...clientConfig?.fetchOptions,
4848
headers,
49-
body: options?.body as (BodyInit & (globalThis.BodyInit | null)) | undefined,
49+
body: options?.body as
50+
| (BodyInit & (globalThis.BodyInit | null))
51+
| undefined,
5052
method: options?.method ?? 'GET',
5153
};
5254

0 commit comments

Comments
 (0)