11#include <nlohmann/json.hpp>
14 using json = nlohmann::json;
73 bool generateFileServingApi()
const;
79 bool generateTableCrudApis();
81 bool generateMiscEndpoints()
const;
87 bool generateAdminCrudApis()
const;
89 std::shared_ptr<TableUnit> m_adminTable;
90 std::shared_ptr<SysTablesUnit> m_tableRoutes;
91 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:22
void close()
Definition router.cpp:77
json updateRouteCache(const json &table_data=json::object())
Definition router.cpp:198
const std::string __class_name__
Definition router.h:66
bool listen() const
Definition router.cpp:62
json updateRoute(const json &table_data=json::object())
Definition router.cpp:136
std::vector< json > adminTableFields
Definition router.h:94
json removeRoute(const json &table_data=json::object())
Definition router.cpp:225
json addRoute(const std::string &table)
Restart the HTTP server.
Definition router.cpp:82
Router()
Definition router.cpp:23
bool initialize()
Initialize the router instance creating tables and admin routes.
Definition router.cpp:43
nlohmann::json json
Definition mantis.h:35
router.h
Definition app.h:31
nlohmann::json json
Shorten JSON namespace.
Definition crud.h:14