aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/constants.py1
-rw-r--r--bot/exts/moderation/metabase.py2
-rw-r--r--config-default.yml1
3 files changed, 3 insertions, 1 deletions
diff --git a/bot/constants.py b/bot/constants.py
index 80e01b174..4e99df7f3 100644
--- a/bot/constants.py
+++ b/bot/constants.py
@@ -569,6 +569,7 @@ class Metabase(metaclass=YAMLGetter):
username: Optional[str]
password: Optional[str]
base_url: str
+ public_url: str
max_session_age: int
diff --git a/bot/exts/moderation/metabase.py b/bot/exts/moderation/metabase.py
index 3b454ab18..9eeeec074 100644
--- a/bot/exts/moderation/metabase.py
+++ b/bot/exts/moderation/metabase.py
@@ -167,7 +167,7 @@ class Metabase(Cog):
async with self.bot.http_session.post(url, headers=self.headers, raise_for_status=True) as resp:
response_json = await resp.json(encoding="utf-8")
- sharing_url = f"{MetabaseConfig.base_url}/public/question/{response_json['uuid']}"
+ sharing_url = f"{MetabaseConfig.public_url}/public/question/{response_json['uuid']}"
await ctx.send(f":+1: {ctx.author.mention} Here's your sharing link: {sharing_url}")
# This cannot be static (must have a __func__ attribute).
diff --git a/config-default.yml b/config-default.yml
index 8e0b97a51..baece5c51 100644
--- a/config-default.yml
+++ b/config-default.yml
@@ -441,6 +441,7 @@ metabase:
username: !ENV "METABASE_USERNAME"
password: !ENV "METABASE_PASSWORD"
base_url: "http://metabase.default.svc.cluster.local"
+ public_url: "https://metabase.pythondiscord.com"
# 14 days, see https://www.metabase.com/docs/latest/operations-guide/environment-variables.html#max_session_age
max_session_age: 20160