~redstrate/public-inbox

astra: Fix to sapphire again! v1 APPLIED

Sorry! I sent the wrong commit before on accident. The fix to the string
was in the wrong place, this should now fix both register and login.

Toofy (1):
  Correct placement of String in right method

 launcher/core/src/sapphirelauncher.cpp | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

-- 
2.34.5
No problem! I applied this one to main too. Thank you again for fixing Sapphire 
support!
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~redstrate/public-inbox/patches/38218/mbox | git am -3
Learn more about email & git

[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!