From c58b774c83178c6e0fe37bfc6739e4db83f2db10 Mon Sep 17 00:00:00 2001 From: Aaron Shiel Date: Mon, 25 Nov 2024 15:01:37 -0800 Subject: [PATCH] subdomain fix --- node/src/gql/query/home-page-data.ts | 2 +- node/test/graphql/query/home-page-data.spec.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/node/src/gql/query/home-page-data.ts b/node/src/gql/query/home-page-data.ts index b1f3cc6..65e9c0d 100644 --- a/node/src/gql/query/home-page-data.ts +++ b/node/src/gql/query/home-page-data.ts @@ -118,7 +118,7 @@ export const homePageData = { mentorsIntroAnswers.find( (answer) => answer.mentor.toString() === mentor._id.toString() )?.transcript || '', - mentorUrl: `https://${org?.name ? `${org.name}.` : ''}${domain}/chat/?mentor=${mentor._id}`, + mentorUrl: `https://${org?.subdomain ? `${org.subdomain}.` : ''}${domain}/chat/?mentor=${mentor._id}`, thumbnail: mentor.thumbnail ? toAbsoluteUrl(mentor.thumbnail) : null, })); const homePageMentorPanels: HomePageMentorPanel[] = panels.map((panel) => ({ diff --git a/node/test/graphql/query/home-page-data.spec.ts b/node/test/graphql/query/home-page-data.spec.ts index b2be540..c9db385 100644 --- a/node/test/graphql/query/home-page-data.spec.ts +++ b/node/test/graphql/query/home-page-data.spec.ts @@ -127,7 +127,7 @@ describe('home-page-data', () => { keywords: ['Female'], transcript: '', mentorUrl: - 'https://USC.fakedomain.org/chat/?mentor=5ffdf41a1ee2c62111111112', + 'https://usc.fakedomain.org/chat/?mentor=5ffdf41a1ee2c62111111112', thumbnail: null, }, ]);