Synk virker

This commit is contained in:
2026-04-20 01:41:24 +02:00
parent f92af40dd7
commit 8a4c879213
4 changed files with 163 additions and 98 deletions

View File

@@ -14,10 +14,12 @@ logger = logging.getLogger(__name__)
class SyncManager:
def __init__(self, api_url: str, db_path: str):
self._api_url = api_url.rstrip("/")
def __init__(self, api_url: str = "", db_path: str = "",
server_url: str = "", token: str | None = None):
# Støt både api_url og server_url som parameter-navn
self._api_url = (api_url or server_url).rstrip("/")
self._db_path = db_path
self._token: str | None = None
self._token: str | None = token
def set_token(self, token: str):
self._token = token