diff --git a/src/client.py b/src/client.py index b5bfefb..a187b28 100644 --- a/src/client.py +++ b/src/client.py @@ -28,11 +28,7 @@ def login_required(f): def createClientBlueprint(wireguardConfigurations: dict[WireguardConfiguration], dashboardConfig: DashboardConfig): from modules.DashboardClients import DashboardClients - - - - with current_app.app_context(): - DashboardClients = DashboardClients(wireguardConfigurations) + client = Blueprint('client', __name__, template_folder=os.path.abspath("./static/client/dist")) prefix = f'{dashboardConfig.GetConfig("Server", "app_prefix")[1]}/client' diff --git a/src/dashboard.py b/src/dashboard.py index 0bdcb5d..c7e5c9c 100644 --- a/src/dashboard.py +++ b/src/dashboard.py @@ -1284,7 +1284,8 @@ DashboardLogger: DashboardLogger = DashboardLogger() InitWireguardConfigurationsList(startup=True) -app.register_blueprint(createClientBlueprint(WireguardConfigurations, DashboardConfig)) +with app.app_context(): + app.register_blueprint(createClientBlueprint(WireguardConfigurations, DashboardConfig)) def startThreads(): bgThread = threading.Thread(target=peerInformationBackgroundThread, daemon=True)