mirror of
https://bitbucket.org/theswgsource/src-1.2.git
synced 2026-10-01 16:13:19 -04:00
for nullable types we'll need to create a proper function outside the template for them
This commit is contained in:
@@ -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