Format some files

This commit is contained in:
antao 2019-01-02 18:49:37 +08:00
parent 159b5cebdd
commit f35ff6347a
4 changed files with 55 additions and 55 deletions

View File

@ -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;

View File

@ -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,

View File

@ -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}