636fdf8df1
add: static on schedule
17 lines
672 B
C++
17 lines
672 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_one_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_one_by_tag(const HttpRequestPtr& req, std::function<void (const HttpResponsePtr &)> &&callback, const std::string& relay_tag);
|
|
};
|
|
}
|