Format some files
This commit is contained in:
parent
159b5cebdd
commit
f35ff6347a
|
@ -5,7 +5,7 @@ namespace example
|
|||
{
|
||||
class TestController : public drogon::HttpSimpleController<TestController>
|
||||
{
|
||||
public:
|
||||
public:
|
||||
virtual void asyncHandleHttpRequest(const HttpRequestPtr &req, const std::function<void(const HttpResponsePtr &)> &callback) override;
|
||||
PATH_LIST_BEGIN
|
||||
//list path definations here;
|
||||
|
|
|
@ -5,11 +5,11 @@ namespace api
|
|||
{
|
||||
class Attachment : public drogon::HttpController<Attachment>
|
||||
{
|
||||
public:
|
||||
public:
|
||||
METHOD_LIST_BEGIN
|
||||
//use METHOD_ADD to add your custom processing function here;
|
||||
METHOD_ADD(Attachment::get, "", Get); //Path will be '/api/attachment'
|
||||
METHOD_ADD(Attachment::upload,"/upload",Post);
|
||||
METHOD_ADD(Attachment::upload, "/upload", Post);
|
||||
METHOD_LIST_END
|
||||
//your declaration of processing function maybe like this:
|
||||
void get(const HttpRequestPtr &req,
|
||||
|
|
|
@ -7,7 +7,7 @@ namespace v1
|
|||
{
|
||||
class ApiTest : public drogon::HttpController<ApiTest>
|
||||
{
|
||||
public:
|
||||
public:
|
||||
METHOD_LIST_BEGIN
|
||||
//use METHOD_ADD to add your custom processing function here;
|
||||
METHOD_ADD(ApiTest::get, "/get/{2}/{1}", "drogon::GetFilter"); //path will be /api/v1/apitest/get/{arg2}/{arg1}
|
||||
|
|
Loading…
Reference in New Issue