mirror of
https://github.com/tribufu/sdk-js
synced 2025-06-15 18:24:19 +00:00
Update client.ts
This commit is contained in:
@ -40,7 +40,7 @@ export class TribufuClient extends TribufuApi {
|
|||||||
*/
|
*/
|
||||||
public static override fromEnv(prefix?: string | null): TribufuClient | null {
|
public static override fromEnv(prefix?: string | null): TribufuClient | null {
|
||||||
const envPrefix = prefix ? `${prefix}_` : "";
|
const envPrefix = prefix ? `${prefix}_` : "";
|
||||||
const apiKey = process.env[`${envPrefix}API_KEY`];
|
//const apiKey = process.env[`${envPrefix}API_KEY`];
|
||||||
const clientId = process.env[`${envPrefix}CLIENT_ID`];
|
const clientId = process.env[`${envPrefix}CLIENT_ID`];
|
||||||
const clientSecret = process.env[`${envPrefix}CLIENT_SECRET`];
|
const clientSecret = process.env[`${envPrefix}CLIENT_SECRET`];
|
||||||
|
|
||||||
@ -50,9 +50,11 @@ export class TribufuClient extends TribufuApi {
|
|||||||
|
|
||||||
const client = new TribufuClient(clientId, clientSecret);
|
const client = new TribufuClient(clientId, clientSecret);
|
||||||
|
|
||||||
|
/*
|
||||||
if (apiKey) {
|
if (apiKey) {
|
||||||
client.setApiKey(apiKey);
|
client.setApiKey(apiKey);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
return client;
|
return client;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user