Store base URL to allow switching to other NC installations

This commit is contained in:
Christian Wolf 2025-01-15 19:03:52 +01:00
parent 96ad8da1fb
commit 2614357a12

View File

@ -49,13 +49,14 @@ def run(args):
l.info('Login successful') l.info('Login successful')
class LoginData: class LoginData:
def __init__(self, loginName, appPassword): def __init__(self, loginName, appPassword, base):
self.loginName = loginName self.loginName = loginName
self.appPassword = appPassword self.appPassword = appPassword
self.base = base
def loadLoginData(): def loadLoginData():
with open('login.json', 'r') as f: with open('login.json', 'r') as f:
data = json.load(f) data = json.load(f)
return LoginData(data['loginName'], data['appPassword']) return LoginData(data['loginName'], data['appPassword'], data['base'])