Skip to content

Commit

Permalink
refactor: avoid to user SERVER_FQDN anywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
azmeuk committed Feb 21, 2024
1 parent f9dba54 commit 67d2c0c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions web/b3desk/models/meetings.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def get_quick_meeting_from_user_and_random_string(user, random_string=None):
],
logoutUrl=(
current_app.config["QUICK_MEETING_LOGOUT_URL"]
or current_app.config["SERVER_FQDN"]
or url_for("routes.index", _external=True)
),
)
meeting.fake_id = random_string
Expand Down Expand Up @@ -323,7 +323,7 @@ def get_mail_meeting(random_string=None):
moderatorOnlyMessage=current_app.config["MAIL_MODERATOR_WELCOME_MESSAGE"],
logoutUrl=(
current_app.config["QUICK_MEETING_LOGOUT_URL"]
or current_app.config["SERVER_FQDN"]
or url_for("routes.index", _external=True)
),
)
meeting.fake_id = random_string
Expand Down
2 changes: 1 addition & 1 deletion web/b3desk/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ def DOCUMENTATION_LINK(self) -> Dict[str, Any]:
"label": self.DOCUMENTATION_LINK_LABEL,
"is_external": self.DOCUMENTATION_LINK_URL
and self.DOCUMENTATION_LINK_URL.lower().startswith(
("/", self.SERVER_FQDN.lower())
("/", "http://", "https://")
),
}

Expand Down
2 changes: 1 addition & 1 deletion web/tests/meeting/test_meeting.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ def test_create(client_app, meeting, mocker, bbb_response):
"uploadExternalDescription": client_app.app.config[
"EXTERNAL_UPLOAD_DESCRIPTION"
],
"uploadExternalUrl": f"{client_app.app.config['SERVER_FQDN']}/meeting/{str(meeting.id)}/externalUpload",
"uploadExternalUrl": f"http://localhost:5000/meeting/{str(meeting.id)}/externalUpload",
}

assert mocked_background_upload.called
Expand Down

0 comments on commit 67d2c0c

Please sign in to comment.