2019-07-22 20:26:42 +00:00
|
|
|
#pragma once
|
|
|
|
#include <drogon/HttpController.h>
|
|
|
|
using namespace drogon;
|
2019-09-08 21:24:31 +00:00
|
|
|
namespace api::v1
|
2019-07-22 20:26:42 +00:00
|
|
|
{
|
|
|
|
class relays:public drogon::HttpController<relays>
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
METHOD_LIST_BEGIN
|
2019-09-24 21:33:35 +00:00
|
|
|
METHOD_ADD(relays::get_all, "/", Get, Options);
|
2020-04-28 19:50:19 +00:00
|
|
|
METHOD_ADD(relays::get_by_tag, "/tag/{1}", Get, Options);
|
2019-07-22 20:26:42 +00:00
|
|
|
METHOD_LIST_END
|
|
|
|
|
|
|
|
static void get_all(const HttpRequestPtr& req, std::function<void (const HttpResponsePtr &)> &&callback);
|
2020-04-28 19:50:19 +00:00
|
|
|
static void get_by_tag(const HttpRequestPtr& req, std::function<void (const HttpResponsePtr &)> &&callback, const std::string& tag);
|
2019-07-22 20:26:42 +00:00
|
|
|
};
|
|
|
|
}
|