mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-20 19:57:45 +00:00
Adding fix for connecting to a sapphire server
This commit is contained in:
parent
3e030587c7
commit
103cc34170
1 changed files with 2 additions and 5 deletions
|
@ -39,10 +39,7 @@ void SapphireLauncher::login(const QString& lobbyUrl, const LoginInformation& in
|
||||||
|
|
||||||
void SapphireLauncher::registerAccount(const QString& lobbyUrl, const LoginInformation& info) {
|
void SapphireLauncher::registerAccount(const QString& lobbyUrl, const LoginInformation& info) {
|
||||||
QJsonObject data{{"username", info.username}, {"pass", info.password}};
|
QJsonObject data{{"username", info.username}, {"pass", info.password}};
|
||||||
QUrl url;
|
QUrl url(lobbyUrl + "/sapphire-api/lobby/login");
|
||||||
url.setScheme("http");
|
|
||||||
url.setHost(lobbyUrl);
|
|
||||||
url.setPath("/sapphire-api/lobby/createAccount");
|
|
||||||
|
|
||||||
QNetworkRequest request(url);
|
QNetworkRequest request(url);
|
||||||
request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded");
|
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);
|
window.launchGame(*info.settings, auth);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue