diff options
author | erdgeist <erdgeist@erdgeist.org> | 2025-01-06 03:01:25 +0100 |
---|---|---|
committer | erdgeist <erdgeist@erdgeist.org> | 2025-01-06 03:01:25 +0100 |
commit | 9498dc9d788c222485b8af64860128b4d33bb039 (patch) | |
tree | 8a3a0e5ee07464a6cd6e2ff70b98f2f00d8e54c4 /fullnarp.py | |
parent | fd1137c3b5d49c1e98194bcceebdbaaa064bc531 (diff) |
Make version_url provided by the server
Diffstat (limited to 'fullnarp.py')
-rw-r--r-- | fullnarp.py | 4 |
1 files changed, 3 insertions, 1 deletions
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. | |||
42 | engine = None | 42 | engine = None |
43 | SessionLocal = None | 43 | SessionLocal = None |
44 | Base = declarative_base() | 44 | Base = declarative_base() |
45 | 45 | fullnarp_path = "" | |
46 | 46 | ||
47 | class TalkPreference(Base): | 47 | class TalkPreference(Base): |
48 | __tablename__ = "talk_preference" | 48 | __tablename__ = "talk_preference" |
@@ -70,6 +70,7 @@ async def notify_clients(): | |||
70 | message = { | 70 | message = { |
71 | "property": "fullnarp", | 71 | "property": "fullnarp", |
72 | "current_version": newest_version, | 72 | "current_version": newest_version, |
73 | "version_url": fullnarp_path + "versions/fullnarp_" + str(newest_version) + ".json", | ||
73 | "data": current_version, | 74 | "data": current_version, |
74 | } | 75 | } |
75 | 76 | ||
@@ -205,6 +206,7 @@ async def main(): | |||
205 | config = json.load(json_file) | 206 | config = json.load(json_file) |
206 | 207 | ||
207 | DATABASE_URL = config.get("database-uri", "sqlite:///test.db") | 208 | DATABASE_URL = config.get("database-uri", "sqlite:///test.db") |
209 | fullnarp_path = config.get("fullnarp-path") | ||
208 | 210 | ||
209 | print(f"Connecting to {DATABASE_URL}") | 211 | print(f"Connecting to {DATABASE_URL}") |
210 | engine = create_engine(DATABASE_URL, echo=False) | 212 | engine = create_engine(DATABASE_URL, echo=False) |