diff --git a/include/consts.hpp b/include/consts.hpp index 0a0913b..8430578 100644 --- a/include/consts.hpp +++ b/include/consts.hpp @@ -1,8 +1,8 @@ #pragma once // Setting both values to 0 does not compile logging (useful for if disk/memory is very valuable) -constexpr unsigned max_log_size = 100; -constexpr unsigned pre_log_size = 10; +constexpr unsigned max_log_size = 0; +constexpr unsigned pre_log_size = 0; constexpr unsigned max_name_size = 50; @@ -25,4 +25,6 @@ if false, when frequency is hit save cons HIGH disk usage */ -#define CONSERVATIVE_DISK_SAVE true \ No newline at end of file +#define CONSERVATIVE_DISK_SAVE true + +#define V1_API true \ No newline at end of file diff --git a/main.cpp b/main.cpp index 3a18c95..c943c8b 100644 --- a/main.cpp +++ b/main.cpp @@ -84,8 +84,9 @@ int main(int argc, char **argv) }).detach(); } - //endpoints +#if V1_API auto APIv1 = std::make_shared(bank); //v1 +#endif auto user_filter = std::make_shared(bank); auto admin_filter = std::make_shared(bank); @@ -97,7 +98,9 @@ int main(int argc, char **argv) .loadConfigFile(config_location) .registerFilter(user_filter) .registerFilter(admin_filter) +#if V1_API .registerController(APIv1) +#endif .setThreadNum(get_nprocs()) .run();