Skip to content

Commit

Permalink
string handler: string->string
Browse files Browse the repository at this point in the history
felixguendling committed Jun 18, 2024
1 parent 7f5eb01 commit e8a7335
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/net/web_server/query_router.h
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ struct route_request : public web_server::http_req_t {
};

template <typename Fn>
concept StringRouteHandler = requires(route_request const& req, Fn f) {
concept StringRouteHandler = requires(std::string_view const& req, Fn f) {
{ f(req) } -> std::convertible_to<std::string>;
};

@@ -52,7 +52,7 @@ struct query_router {
try {
auto res = net::web_server::string_res_t{
boost::beast::http::status::ok, req.version()};
res.body() = fn(req);
res.body() = fn(req.body());
res.keep_alive(req.keep_alive());
cb(res);
} catch (std::exception const& e) {

0 comments on commit e8a7335

Please sign in to comment.