From f1cce097adffa3e4ba72f9f48f5e39d973086678 Mon Sep 17 00:00:00 2001 From: piair Date: Tue, 27 Feb 2024 01:34:56 +0100 Subject: [PATCH] moved the initialisation to Config.py --- modules/Classes/Config.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/Classes/Config.py b/modules/Classes/Config.py index 2a0e75d..2f278a0 100644 --- a/modules/Classes/Config.py +++ b/modules/Classes/Config.py @@ -1,7 +1,15 @@ +import json + from modules.Classes.UserCredentials import UserCredentials class Config: def __init__(self, args): self.args = args - self.UserCredentials = UserCredentials(args.config) + self.UserCredentials = UserCredentials() + + with open("/app/MsRewards-Reborn/user_data/configs.json", "r") as inFile: + configs = json.load(inFile) + for i in configs[str(args.config)]["accounts"]: + d = configs[str(args.config)]["accounts"][i] + self.UserCredentials.add(d["mail"], d["pwd"], d["2fa"])