From 8d50efd3347e8c5ee1210069794d31cfebcc0a2c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Simon=20K=C3=BCnzel?= <simonk@fsmpi.rwth-aachen.de>
Date: Sun, 26 May 2024 01:56:14 +0200
Subject: [PATCH] Replace SERVER_NAME config key as flask doesn't like it

---
 config/api_example_config.py | 2 +-
 src/api/routes/site.py       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/config/api_example_config.py b/config/api_example_config.py
index 32996cc..9a21cd9 100644
--- a/config/api_example_config.py
+++ b/config/api_example_config.py
@@ -2,7 +2,7 @@
 DEBUG = True
 
 # Name of this instance
-SERVER_NAME = "dev"
+API_SERVER_NAME = "dev"
 
 # Prefix which is prepended to paths (which are saved in the database) before they are provided by the api
 # Must include the last /
diff --git a/src/api/routes/site.py b/src/api/routes/site.py
index f9c420d..9ed4eda 100644
--- a/src/api/routes/site.py
+++ b/src/api/routes/site.py
@@ -11,7 +11,7 @@ _GIT_COMMIT_HASH = os.environ.get("VIDEOAG_API_GIT_COMMIT_HASH", None)
 if _GIT_COMMIT_HASH is not None and len(_GIT_COMMIT_HASH) == 0:
     _GIT_COMMIT_HASH = None
 
-_SERVER_NAME = api.config["SERVER_NAME"]
+_SERVER_NAME = api.config["API_SERVER_NAME"]
 
 
 @api_route("/status", ["GET"], allow_while_readonly=True, allow_while_disabled=True)
-- 
GitLab