diff --git a/backend/.env.dist b/backend/.env.dist index f13a755b8e..c6611f013a 100644 --- a/backend/.env.dist +++ b/backend/.env.dist @@ -8,8 +8,6 @@ BREVO_NEWSLETTER_LIST="3" DATABASE_URL="mysql://root:@localhost:3306/dreammall.earth" FRONTEND_URL="http://localhost:3000/" -FRONTEND_INVITE_LINK_URL="${FRONTEND_URL}join-table/" -FRONTEND_BBB_LOGOUT_URL="${FRONTEND_URL}table-closed/" BBB_SHARED_SECRET="" BBB_URL="" diff --git a/backend/src/api/BBB.ts b/backend/src/api/BBB.ts index 0c89a3b3d1..a4b816cef6 100644 --- a/backend/src/api/BBB.ts +++ b/backend/src/api/BBB.ts @@ -26,7 +26,7 @@ const parser = new XMLParser({ const defaultCreateMeetingBodyOptions = { welcome: '
', meetingLayout: MeetingLayouts.SMART_LAYOUT, - logoutURL: CONFIG.FRONTEND_BBB_LOGOUT_URL, + logoutURL: new URL('table-closed/', CONFIG.FRONTEND_URL), } export const getMeetings = async (): Promise => { diff --git a/backend/src/config/config.ts b/backend/src/config/config.ts index b004121354..3a85daa598 100644 --- a/backend/src/config/config.ts +++ b/backend/src/config/config.ts @@ -35,12 +35,10 @@ const BBB = { BBB_PULL_MEETINGS: process.env.NODE_ENV !== 'test' && process.env.BBB_URL, } +const FRONTEND_URL = process.env.FRONTEND_URL ?? 'http://localhost:3000/' + const FRONTEND = { - FRONTEND_URL: process.env.FRONTEND_URL ?? 'http://localhost:3000/', - FRONTEND_INVITE_LINK_URL: - process.env.FRONTEND_INVITE_LINK_URL ?? 'http://localhost:3000/join-table/', - FRONTEND_BBB_LOGOUT_URL: - process.env.FRONTEND_BBB_LOGOUT_URL ?? 'http://localhost:3000/table-closed/', + FRONTEND_URL, } const { JWKS_URI } = process.env diff --git a/backend/src/graphql/resolvers/TableResolver.spec.ts b/backend/src/graphql/resolvers/TableResolver.spec.ts index 1a84a117fd..4bef989dab 100644 --- a/backend/src/graphql/resolvers/TableResolver.spec.ts +++ b/backend/src/graphql/resolvers/TableResolver.spec.ts @@ -18,7 +18,7 @@ const getMeetingsMock = jest.mocked(getMeetings) let testServer: ApolloServer -CONFIG.FRONTEND_INVITE_LINK_URL = '/' +CONFIG.FRONTEND_URL = 'https://my.frontend.url' const nickname = 'mockedUser' const name = 'User' @@ -808,7 +808,7 @@ describe('TableResolver', () => { meetingID: result?.meeting?.meetingID, }, { - moderatorOnlyMessage: `Use this link to invite more people:
/${result?.meeting?.id}`, + moderatorOnlyMessage: `Use this link to invite more people:
https://my.frontend.url/join-table/${result?.meeting?.id}`, }, ) }) diff --git a/backend/src/graphql/resolvers/TableResolver.ts b/backend/src/graphql/resolvers/TableResolver.ts index e89f6a2d8d..05bd2ddfda 100644 --- a/backend/src/graphql/resolvers/TableResolver.ts +++ b/backend/src/graphql/resolvers/TableResolver.ts @@ -206,7 +206,7 @@ export class TableResolver { throw new Error('Could not create Meeting in DB!') } - const inviteLink = CONFIG.FRONTEND_INVITE_LINK_URL + dbMeeting.id + const inviteLink = new URL(`join-table/${dbMeeting.id}`, CONFIG.FRONTEND_URL).toString() const meeting = await createMeeting( { diff --git a/infrastructure/helmfile/dreammall/templates/backend-deployment.yaml b/infrastructure/helmfile/dreammall/templates/backend-deployment.yaml index 712b5735b5..e5c8f6f95d 100644 --- a/infrastructure/helmfile/dreammall/templates/backend-deployment.yaml +++ b/infrastructure/helmfile/dreammall/templates/backend-deployment.yaml @@ -25,11 +25,6 @@ spec: configMapKeyRef: name: {{ .Release.Name }} key: frontend_url - - name: FRONTEND_INVITE_LINK_URL - valueFrom: - configMapKeyRef: - name: {{ .Release.Name }} - key: frontend_invite_link_url - name: NODE_ENV value: production image: "{{ .Values.backend.image.repository }}:{{ default .Values.global.image.tag .Values.backend.image.tag "latest" }}" @@ -48,11 +43,6 @@ spec: configMapKeyRef: name: {{ .Release.Name }} key: frontend_url - - name: FRONTEND_INVITE_LINK_URL - valueFrom: - configMapKeyRef: - name: {{ .Release.Name }} - key: frontend_invite_link_url - name: JWKS_URI valueFrom: configMapKeyRef: diff --git a/infrastructure/helmfile/dreammall/values.yaml b/infrastructure/helmfile/dreammall/values.yaml index 2675c250d4..d32dccbaf4 100644 --- a/infrastructure/helmfile/dreammall/values.yaml +++ b/infrastructure/helmfile/dreammall/values.yaml @@ -28,7 +28,6 @@ configmap: bbb_url: https://cafe.dreammall.earth/bigbluebutton/api/ endpoints_graphql_uri: https://master.dreammall.earth/api/ endpoints_websocket_uri: ws://master.dreammall.earth/api/subscriptions - frontend_invite_link_url: https://app.master.dreammall.earth/join-room/ frontend_url: https://app.master.dreammall.earth jwks_uri: http://authentik-server/application/o/dreammallearth/jwks/ presenter_url: https://master.dreammall.earth diff --git a/infrastructure/helmfile/values/dreammall.yaml.gotmpl b/infrastructure/helmfile/values/dreammall.yaml.gotmpl index c186ecc28b..1ce2e813f9 100644 --- a/infrastructure/helmfile/values/dreammall.yaml.gotmpl +++ b/infrastructure/helmfile/values/dreammall.yaml.gotmpl @@ -28,7 +28,6 @@ configmap: bbb_url: https://cafe.dreammall.earth/bigbluebutton/api/ endpoints_graphql_uri: https://{{ .StateValues.domain }}/api/ endpoints_websocket_uri: ws://{{ .StateValues.domain }}/api/subscriptions - frontend_invite_link_url: https://app.{{ .StateValues.domain }}/join-room/ frontend_url: https://app.{{ .StateValues.domain }} jwks_uri: http://authentik-server/application/o/dreammallearth/jwks/ presenter_url: https://{{ .StateValues.domain }}