Skip to content

Commit 0e39744

Browse files
committed
use require instead of import
1 parent 6da4711 commit 0e39744

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

backend/companion/getKcpToken.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ export async function getKcpToken() {
33
const grantType = 'client_credentials';
44
const clientId =
55
process.env.COMPANION_KCP_AUTH_CLIENT_SECRET ??
6-
(await import('./credentials.js'))?.credentials?.clientId;
6+
require('./credentials.js')?.credentials?.clientId;
77
const clientSecret =
88
process.env.COMPANION_KCP_AUTH_CLIENT_ID ??
9-
(await import('./credentials.js'))?.credentials?.clientSecret;
9+
require('./credentials.js')?.credentials?.clientSecret;
1010

1111
if (!clientId) {
1212
throw new Error('COMPANION_KCP_AUTH_CLIENT_ID is not set');
@@ -44,3 +44,7 @@ export async function getKcpToken() {
4444
throw new Error(`Failed to fetch token: ${error.message}`);
4545
}
4646
}
47+
48+
function loadLocalCredentials() {
49+
const credentials = require('backend/companion/credentials.js');
50+
}

0 commit comments

Comments
 (0)