mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-22 05:27:19 +00:00
address feedback
This commit is contained in:
parent
c3ea448be0
commit
9192dca4e6
@ -1,7 +1,7 @@
|
||||
#include <cstdint>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
#include "ChatWebApi.h"
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#include "dCommonVars.h"
|
||||
#include "eConnectionType.h"
|
||||
#include "eChatMessageType.h"
|
||||
@ -9,8 +9,8 @@
|
||||
#include "dServer.h"
|
||||
#include "PlayerContainer.h"
|
||||
#include "dConfig.h"
|
||||
|
||||
using json = nlohmann::json;
|
||||
#include "httplib.h"
|
||||
#include "json.h"
|
||||
|
||||
namespace {
|
||||
httplib::Server m_APIServer;
|
||||
@ -86,8 +86,6 @@ void ChatWebApi::Listen(const uint32_t port) {
|
||||
};
|
||||
|
||||
void ChatWebApi::Stop(){
|
||||
if (Game::config->GetValue("enable_chat_web_api") == "1") {
|
||||
LOG("Stopping Chat Web API server...");
|
||||
m_APIServer.stop();
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "httplib.h"
|
||||
#include <cstdint>
|
||||
|
||||
namespace ChatWebApi {
|
||||
void Listen(const uint32_t port);
|
||||
|
@ -1,7 +1,8 @@
|
||||
#include "PlayerContainer.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
|
||||
#include "PlayerContainer.h"
|
||||
#include "dNetCommon.h"
|
||||
#include "Game.h"
|
||||
#include "Logger.h"
|
||||
@ -14,7 +15,6 @@
|
||||
#include "dConfig.h"
|
||||
#include "eChatMessageType.h"
|
||||
|
||||
|
||||
const json PlayerData::to_json() const {
|
||||
json data;
|
||||
data["id"] = this->playerID;
|
||||
|
@ -6,9 +6,7 @@
|
||||
#include "Game.h"
|
||||
#include "dServer.h"
|
||||
#include <unordered_map>
|
||||
|
||||
#include <nlohmann/json.hpp>
|
||||
using json = nlohmann::json;
|
||||
#include "json.h"
|
||||
|
||||
enum class eGameMasterLevel : uint8_t;
|
||||
|
||||
|
10
dCommon/json.h
Normal file
10
dCommon/json.h
Normal file
@ -0,0 +1,10 @@
|
||||
#ifndef __JSON__H__
|
||||
#define __JSON__H__
|
||||
|
||||
#include "nlohmann/json.hpp"
|
||||
|
||||
namespace {
|
||||
using json = nlohmann::json;
|
||||
}
|
||||
|
||||
#endif // !__JSON__H__
|
@ -48,6 +48,7 @@ paths:
|
||||
get:
|
||||
tags:
|
||||
- user
|
||||
summary: Get all online Players
|
||||
responses:
|
||||
"200":
|
||||
description: Successful operation
|
||||
@ -64,6 +65,7 @@ paths:
|
||||
get:
|
||||
tags:
|
||||
- user
|
||||
summary: Get all active Teams
|
||||
responses:
|
||||
"200":
|
||||
description: Successful operation
|
||||
|
Loading…
Reference in New Issue
Block a user