Skip to content

Commit

Permalink
fix not returning error from Login, remove old code
Browse files Browse the repository at this point in the history
  • Loading branch information
lionkor committed Feb 9, 2024
1 parent d3f5473 commit a8ef0fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Network/Core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <ws2tcpip.h>
#include "Startup.h"
#include "Logger.h"
#include <nlohmann/json.hpp>
#include <charconv>
#include <thread>
#include <set>
Expand Down Expand Up @@ -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));
}
Expand Down
2 changes: 1 addition & 1 deletion src/Security/Login.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}

Expand Down

0 comments on commit a8ef0fb

Please sign in to comment.