mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-04-03 14:26:09 +00:00
Multiple merge fixes, rebase, working Https::GET
This commit is contained in:
@@ -241,9 +241,9 @@ void TNetwork::Authentication(const TConnection& ClientConnection) {
|
||||
auto RequestString = R"({"key":")" + Rc + "\"}";
|
||||
|
||||
auto Target = "/pkToUser";
|
||||
int ResponseCode = -1;
|
||||
unsigned int ResponseCode = 0;
|
||||
if (!Rc.empty()) {
|
||||
Rc = Http::POST(Application::GetBackendUrlForAuth(), Target, {}, RequestString, true, &ResponseCode);
|
||||
Rc = Http::POST(Application::GetBackendUrlForAuth(), 443, Target, {}, RequestString, "application/json", &ResponseCode);
|
||||
}
|
||||
|
||||
json::Document AuthResponse;
|
||||
@@ -272,7 +272,6 @@ void TNetwork::Authentication(const TConnection& ClientConnection) {
|
||||
Sentry.Log(SentryLevel::Error, "default", "unexpected backend response (" + std::to_string(ResponseCode) + ")");
|
||||
}
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
if (AuthResponse["username"].IsString() && AuthResponse["roles"].IsString()
|
||||
@@ -931,4 +930,4 @@ std::string TNetwork::UDPRcvFromClient(sockaddr_in& client) const {
|
||||
return "";
|
||||
}
|
||||
return std::string(Ret.begin(), Ret.begin() + Rcv);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user