diff --git a/examples/simple_example/TestController.h b/examples/simple_example/TestController.h index db7f7d52..53127d33 100755 --- a/examples/simple_example/TestController.h +++ b/examples/simple_example/TestController.h @@ -7,12 +7,12 @@ namespace example{ public: virtual void asyncHandleHttpRequest(const HttpRequestPtr& req,const std::function&callback)override; PATH_LIST_BEGIN - //list path definations here; - //PATH_ADD("/path","filter1","filter2",...); - PATH_ADD("/"); - PATH_ADD("/Test","nonFilter"); - PATH_ADD("/tpost","drogon::PostFilter"); - PATH_ADD("/slow","TimeFilter"); + //list path definations here; + //PATH_ADD("/path","filter1","filter2",...); + PATH_ADD("/"); + PATH_ADD("/Test","nonFilter"); + PATH_ADD("/tpost","drogon::PostFilter"); + PATH_ADD("/slow","TimeFilter"); PATH_LIST_END }; } diff --git a/examples/simple_example/WebSocketTest.h b/examples/simple_example/WebSocketTest.h index f8452b17..d1051a93 100644 --- a/examples/simple_example/WebSocketTest.h +++ b/examples/simple_example/WebSocketTest.h @@ -10,7 +10,7 @@ namespace example std::string &&)override; virtual void handleConnectionClosed(const WebSocketConnectionPtr&)override; virtual void handleNewConnection(const HttpRequestPtr &,const WebSocketConnectionPtr&)override; - WS_PATH_LIST_BEGIN + WS_PATH_LIST_BEGIN //list path definations here; WS_PATH_ADD("/chat"); WS_PATH_LIST_END diff --git a/lib/inc/drogon/HttpSimpleController.h b/lib/inc/drogon/HttpSimpleController.h index ee2010ab..cc3c311d 100755 --- a/lib/inc/drogon/HttpSimpleController.h +++ b/lib/inc/drogon/HttpSimpleController.h @@ -20,7 +20,7 @@ #include #include #include -#define PATH_LIST_BEGIN public:\ +#define PATH_LIST_BEGIN \ static std::vector>> paths() \ {\ std::vector>> vet; diff --git a/lib/inc/drogon/WebSocketController.h b/lib/inc/drogon/WebSocketController.h index a65f7d20..d2eebeb8 100644 --- a/lib/inc/drogon/WebSocketController.h +++ b/lib/inc/drogon/WebSocketController.h @@ -23,7 +23,7 @@ #include #include #include -#define WS_PATH_LIST_BEGIN public:\ +#define WS_PATH_LIST_BEGIN \ static std::vector>> paths() \ {\ std::vector>> vet;