fix-testing
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make (push) Failing after 2h59m50s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake (push) Failing after 2h58m23s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson (push) Failing after 2h58m24s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make (push) Failing after 2h59m50s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake (push) Failing after 2h58m23s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson (push) Failing after 2h58m24s
This commit is contained in:
1 parent
ab9172f9b2
commit
ca74c8858c
3 files changed
+6
-1
No files matched your search
@@ -2,5 +2,9 @@
|
|||||||
#include <ConfigManager.hpp>
|
#include <ConfigManager.hpp>
|
||||||
|
|
||||||
namespace config {
|
namespace config {
|
||||||
|
#ifdef TEST
|
||||||
|
static ConfigManager config;
|
||||||
|
#else
|
||||||
static ConfigManager config(std::string("../config.json"));
|
static ConfigManager config(std::string("../config.json"));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
#include <httplib.h>
|
#include <httplib.h>
|
||||||
#include <json.hpp>
|
#include <json.hpp>
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
|
#include <types.hpp>
|
||||||
|
|
||||||
inline void check_body_empty(const httplib::Request& request, httplib::Response& response, std::string required_string) {
|
inline void check_body_empty(const httplib::Request& request, httplib::Response& response, std::string required_string) {
|
||||||
if (request.body.empty()) {
|
if (request.body.empty()) {
|
||||||
|
|||||||
+1
-1
@@ -3,10 +3,10 @@
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
OpenRouter::OpenRouter router;
|
|
||||||
#ifdef TEST
|
#ifdef TEST
|
||||||
return 0;
|
return 0;
|
||||||
#else
|
#else
|
||||||
|
OpenRouter::OpenRouter router;
|
||||||
return router.serve(
|
return router.serve(
|
||||||
config::config.getConfig()["server"]["ip"],
|
config::config.getConfig()["server"]["ip"],
|
||||||
config::config.getConfig()["server"]["port"]
|
config::config.getConfig()["server"]["port"]
|
||||||
|
|||||||
Reference in new issue
Block a user