11#include <nlohmann/json.hpp>
15 using json = nlohmann::json;
69 bool generateTableCrudApis();
70 bool generateAdminCrudApis()
const;
72 std::shared_ptr<TableUnit> m_adminTable;
73 std::shared_ptr<SysTablesUnit> m_tableRoutes;
74 std::vector<std::shared_ptr<TableUnit>> m_routes = {};
Router class allows for managing routes as well as acting as a top-wrapper on the HttpUnit.
Definition router.h:24
void close()
Definition router.cpp:76
json updateRouteCache(const json &table_data=json::object())
Definition router.cpp:214
const std::string __class_name__
Definition router.h:67
bool listen() const
Definition router.cpp:56
json updateRoute(const json &table_data=json::object())
Definition router.cpp:143
json removeRoute(const json &table_data=json::object())
Definition router.cpp:244
json addRoute(const std::string &table)
Restart the HTTP server.
Definition router.cpp:82
Router()
Definition router.cpp:22
bool initialize()
Initialize the router instance creating tables and admin routes.
Definition router.cpp:41
nlohmann::json json
Definition mantis.h:35
router.h
Definition app.h:30
nlohmann::json json
Shorten JSON namespace.
Definition crud.h:14