From 9498dc9d788c222485b8af64860128b4d33bb039 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Mon, 6 Jan 2025 03:01:25 +0100 Subject: Make version_url provided by the server --- fullnarp.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'fullnarp.py') diff --git a/fullnarp.py b/fullnarp.py index 3a1262e..24c5dc6 100644 --- a/fullnarp.py +++ b/fullnarp.py @@ -42,7 +42,7 @@ speaker availibilities. It should only be served behind some auth. engine = None SessionLocal = None Base = declarative_base() - +fullnarp_path = "" class TalkPreference(Base): __tablename__ = "talk_preference" @@ -70,6 +70,7 @@ async def notify_clients(): message = { "property": "fullnarp", "current_version": newest_version, + "version_url": fullnarp_path + "versions/fullnarp_" + str(newest_version) + ".json", "data": current_version, } @@ -205,6 +206,7 @@ async def main(): config = json.load(json_file) DATABASE_URL = config.get("database-uri", "sqlite:///test.db") + fullnarp_path = config.get("fullnarp-path") print(f"Connecting to {DATABASE_URL}") engine = create_engine(DATABASE_URL, echo=False) -- cgit v1.2.3