mirror of
https://github.com/tribufu/tribufu-js
synced 2026-06-01 09:42:36 +00:00
Update client.ts
This commit is contained in:
parent
4186350f7e
commit
6d631ffea8
1 changed files with 3 additions and 1 deletions
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue