We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3903d79 commit 4c64e51Copy full SHA for 4c64e51
src/lib/config.ts
@@ -6,6 +6,7 @@
6
export interface CountlyConfig {
7
serverUrl: string;
8
timeout?: number;
9
+ authToken?: string;
10
}
11
12
export interface ServerEnvironment {
@@ -82,7 +83,7 @@ export function validateServerUrl(url: string): boolean {
82
83
*/
84
export function buildConfig(
85
env: ServerEnvironment = process.env,
- _authToken?: string,
86
+ authToken?: string,
87
testMode = false
88
): CountlyConfig {
89
const config = loadConfigFromEnv(env);
@@ -95,5 +96,6 @@ export function buildConfig(
95
96
);
97
98
- return config;
99
+ // Return config with authToken if provided
100
+ return authToken ? { ...config, authToken } : config;
101
0 commit comments