Skip to content

Commit dbdee46

Browse files
committed
chore: simplify endpoint resolution
1 parent 41cb841 commit dbdee46

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

packages/atlas-service/src/util.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ const config = {
176176
issuer: 'https://auth.mongodb.com/oauth2/default',
177177
},
178178
authPortalUrl: 'https://account.mongodb.com/account/login',
179-
assistantApiBaseUrl: 'https://knowledge.corp.mongodb.com/api/v1',
179+
assistantApiBaseUrl: 'https://knowledge.staging.corp.mongodb.com/api/v1',
180180
},
181181
'web-sandbox-atlas-local': {
182182
wsBaseUrl: '/ccs',
@@ -187,6 +187,7 @@ const config = {
187187
issuer: 'https://auth-qa.mongodb.com/oauth2/default',
188188
},
189189
authPortalUrl: 'https://account-dev.mongodb.com/account/login',
190+
assistantApiBaseUrl: 'https://knowledge.staging.corp.mongodb.com/api/v1',
190191
},
191192
'web-sandbox-atlas-dev': {
192193
wsBaseUrl: '/ccs',

packages/compass-assistant/src/index.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,9 @@ const CompassAssistantProvider = registerCompassPlugin(
2222
return <AssistantProvider chat={chat}>{children}</AssistantProvider>;
2323
},
2424
activate: (initialProps, { atlasService }) => {
25-
// TODO: We will temporarily default to the staging url until the docs
26-
// API is deployed to the production environment.
27-
const baseUrl = process.env.COMPASS_ASSISTANT_USE_ATLAS_SERVICE_URL
28-
? atlasService.assistantApiEndpoint()
29-
: 'https://knowledge.staging.corp.mongodb.com/api/v1';
3025
const chat = new Chat({
3126
transport: new DocsProviderTransport({
32-
baseUrl,
27+
baseUrl: atlasService.assistantApiEndpoint(),
3328
}),
3429
});
3530
return {

0 commit comments

Comments
 (0)