Will be redoing the event interface for subscriptions, some work for the wi and crash fixes

This commit is contained in:
KimLS
2017-01-30 23:22:52 -08:00
parent a8699eb40c
commit d5bd773a46
17 changed files with 205 additions and 98 deletions
+2 -1
View File
@@ -65,7 +65,7 @@ void WebInterface::OnCall(uint16 opcode, EQ::Net::Packet &p)
auto iter = m_calls.find(method);
if (iter == m_calls.end()) {
//if not exist then error
SendError("Invalid request: method not found");
SendError("Invalid request: method not found", id);
return;
}
@@ -99,6 +99,7 @@ void WebInterface::SendError(const std::string &message)
void WebInterface::SendError(const std::string &message, const std::string &id)
{
Json::Value error;
error["id"] = id;
error["error"] = Json::Value();
error["error"]["message"] = message;