mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2025-07-01 15:36:10 +00:00
fix not returning error from Login, remove old code
This commit is contained in:
parent
9dcfa1dca4
commit
8c9d3a5455
@ -14,6 +14,7 @@
|
||||
#include <ws2tcpip.h>
|
||||
#include "Startup.h"
|
||||
#include "Logger.h"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <charconv>
|
||||
#include <thread>
|
||||
#include <set>
|
||||
@ -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));
|
||||
}
|
||||
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user