From 103cc341701ed1b49f0a26021bdad2307174f692 Mon Sep 17 00:00:00 2001 From: Toofy Date: Sat, 14 Jan 2023 20:08:40 +0000 Subject: [PATCH] Adding fix for connecting to a sapphire server --- launcher/core/src/sapphirelauncher.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/launcher/core/src/sapphirelauncher.cpp b/launcher/core/src/sapphirelauncher.cpp index f6ed125..1c7a3d2 100644 --- a/launcher/core/src/sapphirelauncher.cpp +++ b/launcher/core/src/sapphirelauncher.cpp @@ -39,10 +39,7 @@ void SapphireLauncher::login(const QString& lobbyUrl, const LoginInformation& in void SapphireLauncher::registerAccount(const QString& lobbyUrl, const LoginInformation& info) { QJsonObject data{{"username", info.username}, {"pass", info.password}}; - QUrl url; - url.setScheme("http"); - url.setHost(lobbyUrl); - url.setPath("/sapphire-api/lobby/createAccount"); + QUrl url(lobbyUrl + "/sapphire-api/lobby/login"); QNetworkRequest request(url); request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded"); @@ -59,4 +56,4 @@ void SapphireLauncher::registerAccount(const QString& lobbyUrl, const LoginInfor window.launchGame(*info.settings, auth); }); -} \ No newline at end of file +}