mirror of
https://github.com/SWG-Source/src.git
synced 2026-09-30 17:13:05 -04:00
for nullable types we'll need to create a proper function outside the template for them
This commit is contained in:
@@ -2877,11 +2877,11 @@ void CentralServer::sendMetricsToWebAPI()
|
||||
|
||||
#ifdef _DEBUG
|
||||
if (api.submit()) {
|
||||
bool status = api.getRespValue<bool>("status");
|
||||
bool status = api.getNullableValue<bool>("status");
|
||||
|
||||
if (status)
|
||||
{
|
||||
std::string message = api.getRespValue<std::string>("message");
|
||||
std::string message = api.getString("message");
|
||||
|
||||
if (message.empty())
|
||||
{
|
||||
|
||||
@@ -192,8 +192,8 @@ void ClientConnection::validateClient(const std::string & id, const std::string
|
||||
|
||||
if (api.submit())
|
||||
{
|
||||
bool status = api.getRespValue<bool>("status");
|
||||
uname = api.getRespValue<std::string>("username");
|
||||
bool status = api.getNullableValue<bool>("status");
|
||||
uname = api.getString("username");
|
||||
|
||||
if (status && !uname.empty())
|
||||
{
|
||||
@@ -201,7 +201,7 @@ void ClientConnection::validateClient(const std::string & id, const std::string
|
||||
}
|
||||
else
|
||||
{
|
||||
std::string msg = api.getRespValue<std::string>("message");
|
||||
std::string msg = api.getString("message");
|
||||
if (msg.empty())
|
||||
{
|
||||
msg = "Invalid username or password.";
|
||||
|
||||
Reference in New Issue
Block a user