Skip to content

Commit ddf1377

Browse files
committed
this is the end
1 parent 1928db8 commit ddf1377

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

clients/algoliasearch-client-javascript/packages/client-common/src/createAuth.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ export function createAuth(
77
): {
88
readonly headers: () => Headers;
99
readonly queryParameters: () => QueryParameters;
10-
readonly setClientApiKey: (newApiKey: string) => void;
1110
} {
1211
const credentials = {
1312
'x-algolia-api-key': apiKey,
@@ -22,9 +21,5 @@ export function createAuth(
2221
queryParameters(): QueryParameters {
2322
return authMode === 'WithinQueryParameters' ? credentials : {};
2423
},
25-
26-
setClientApiKey(newApiKey: string): void {
27-
credentials['x-algolia-api-key'] = newApiKey;
28-
},
2924
};
3025
}

templates/javascript/clients/api-single.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export function create{{#lambda.titlecase}}{{apiName}}{{/lambda.titlecase}}({
8282
* @param params.apiKey - The new API Key to use.
8383
*/
8484
setClientApiKey({ apiKey }: { apiKey: string }): void {
85-
auth.setClientApiKey(apiKey);
85+
transporter.baseHeaders['x-algolia-api-key'] = apiKey;
8686
},
8787

8888
{{#isSearchClient}}

0 commit comments

Comments
 (0)