Базовая компиляция контроллеров и executor'ов

This commit is contained in:
Антон
2025-08-25 19:11:08 +03:00
parent 781e877463
commit f7977c14ca
6 changed files with 85 additions and 22 deletions
@@ -0,0 +1,26 @@
#pragma once
#include "IExecutor.h"
namespace uad
{
template <class Body, class Allocator, class ResponseType>
class AuthRegistrationExecutor : public IExecutor<Body, Allocator, ResponseType>
{
public:
boost::beast::http::response<ResponseType> operator ()(
boost::beast::http::request<Body, boost::beast::http::basic_fields<Allocator>>&& req
) override
{
boost::beast::http::response<ResponseType> res{
boost::beast::http::status::ok, req.version()
};
res.body() = "{ \"detail\": \"ok\"}";
res.set(boost::beast::http::field::content_type, "application/json");
res.content_length(res.body().size());
return res;
}
};
}