File tree Expand file tree Collapse file tree 2 files changed +1
-6
lines changed
clients/algoliasearch-client-javascript/packages/client-common/src
templates/javascript/clients Expand file tree Collapse file tree 2 files changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ export function createAuth(
7
7
) : {
8
8
readonly headers : ( ) => Headers ;
9
9
readonly queryParameters : ( ) => QueryParameters ;
10
- readonly setClientApiKey : ( newApiKey : string ) => void ;
11
10
} {
12
11
const credentials = {
13
12
'x-algolia-api-key' : apiKey ,
@@ -22,9 +21,5 @@ export function createAuth(
22
21
queryParameters ( ) : QueryParameters {
23
22
return authMode === 'WithinQueryParameters' ? credentials : { } ;
24
23
} ,
25
-
26
- setClientApiKey ( newApiKey : string ) : void {
27
- credentials [ 'x-algolia-api-key' ] = newApiKey ;
28
- } ,
29
24
} ;
30
25
}
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ export function create{{#lambda.titlecase}}{{apiName}}{{/lambda.titlecase}}({
82
82
* @param params.apiKey - The new API Key to use.
83
83
*/
84
84
setClientApiKey({ apiKey } : { apiKey: string } ): void {
85
- auth.setClientApiKey( apiKey) ;
85
+ transporter.baseHeaders[ ' x-algolia-api-key ' ] = apiKey;
86
86
} ,
87
87
88
88
{ {#isSearchClient} }
You can’t perform that action at this time.
0 commit comments