core-legacy/controllers/api_v1_relays.h

18 lines
672 B
C
Raw Normal View History

2019-07-22 20:26:42 +00:00
#pragma once
#include <drogon/HttpController.h>
using namespace drogon;
namespace api::v1
2019-07-22 20:26:42 +00:00
{
class relays:public drogon::HttpController<relays>
{
public:
METHOD_LIST_BEGIN
METHOD_ADD(relays::get_all, "/", Get, Options);
METHOD_ADD(relays::get_one_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);
static void get_one_by_tag(const HttpRequestPtr& req, std::function<void (const HttpResponsePtr &)> &&callback, const std::string& relay_tag);
2019-07-22 20:26:42 +00:00
};
}