[PATCH astra 1/1] Correct placement of String in right method
Export this patch
From: Toofy <mostafa.alsari@gmail.com>
---
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
--
2.34.5
No problem! I applied this one to main too. Thank you again for fixing Sapphire
support!