core-legacy/controllers/api_v1_relays.h
2020-04-28 21:50:19 +02:00

17 lines
658 B
C++

#pragma once
#include <drogon/HttpController.h>
using namespace drogon;
namespace api::v1
{
class relays:public drogon::HttpController<relays>
{
public:
METHOD_LIST_BEGIN
METHOD_ADD(relays::get_all, "/", Get, Options);
METHOD_ADD(relays::get_by_tag, "/tag/{1}", Get, Options);
METHOD_LIST_END
static void get_all(const HttpRequestPtr& req, std::function<void (const HttpResponsePtr &)> &&callback);
static void get_by_tag(const HttpRequestPtr& req, std::function<void (const HttpResponsePtr &)> &&callback, const std::string& tag);
};
}