From 04324554cd44a9b943bcd145d62e11fb0ee4450c Mon Sep 17 00:00:00 2001 From: Toofy Date: Sun, 15 Jan 2023 16:39:36 +0000 Subject: [PATCH] Correct placement of String in right method --- launcher/core/src/sapphirelauncher.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/launcher/core/src/sapphirelauncher.cpp b/launcher/core/src/sapphirelauncher.cpp index 1c7a3d2..aa97595 100644 --- a/launcher/core/src/sapphirelauncher.cpp +++ b/launcher/core/src/sapphirelauncher.cpp @@ -10,10 +10,7 @@ SapphireLauncher::SapphireLauncher(LauncherCore& window) : window(window), QObje void SapphireLauncher::login(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/login"); + QUrl url(lobbyUrl + "/sapphire-api/lobby/login"); QNetworkRequest request(url); request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded"); @@ -39,7 +36,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(lobbyUrl + "/sapphire-api/lobby/login"); + QUrl url(lobbyUrl + "/sapphire-api/lobby/createAccount"); QNetworkRequest request(url); request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded"); @@ -56,4 +53,4 @@ void SapphireLauncher::registerAccount(const QString& lobbyUrl, const LoginInfor window.launchGame(*info.settings, auth); }); -} +} \ No newline at end of file