fix-testing #30

Merged
wt merged 2 commits from fix-testing into main 2025-05-06 11:22:55 +00:00
3 changed files with 6 additions and 1 deletions
Showing only changes of commit ca74c8858c - Show all commits

No files matched your search

+4
View File
@@ -2,5 +2,9 @@
#include <ConfigManager.hpp>
namespace config {
#ifdef TEST
static ConfigManager config;
#else
static ConfigManager config(std::string("../config.json"));
#endif
}
+1
View File
@@ -2,6 +2,7 @@
#include <httplib.h>
#include <json.hpp>
#include <syslog.h>
#include <types.hpp>
inline void check_body_empty(const httplib::Request& request, httplib::Response& response, std::string required_string) {
if (request.body.empty()) {
+1 -1
View File
@@ -3,10 +3,10 @@
int main()
{
OpenRouter::OpenRouter router;
#ifdef TEST
return 0;
#else
OpenRouter::OpenRouter router;
return router.serve(
config::config.getConfig()["server"]["ip"],
config::config.getConfig()["server"]["port"]