diff --git a/src/Network/Core.cpp b/src/Network/Core.cpp index d77ddf3..0f1139e 100755 --- a/src/Network/Core.cpp +++ b/src/Network/Core.cpp @@ -14,6 +14,7 @@ #include #include "Startup.h" #include "Logger.h" +#include #include #include #include @@ -138,7 +139,6 @@ void Parse(std::string Data,SOCKET CSocket){ Auth["role"] = UserRole; } Data = Auth.dump(); - Data = "N{\"Auth\":"+std::to_string(LoginAuth)+",\"username\":\"" + Username + "\",\"role\":\"" + UserRole + "\"}"; }else{ Data = "N" + Login(Data.substr(Data.find(':') + 1)); } diff --git a/src/Security/Login.cpp b/src/Security/Login.cpp index a14d831..1fec7f1 100755 --- a/src/Security/Login.cpp +++ b/src/Security/Login.cpp @@ -89,7 +89,7 @@ std::string Login(const std::string& fields){ } return GetFail("Invalid message parsing!"); } catch (const std::exception& e) { - error(e.what()); + return GetFail(e.what()); } }