Skip to content

Commit

Permalink
fix clang-tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
felixguendling committed May 16, 2024
1 parent 5c63f32 commit 680a92b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/.idea
/*build*
/deps
/.pkg.mutex
/.pkg.mutex
/.clang-tidy
7 changes: 3 additions & 4 deletions exe/backend/src/http_server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ struct http_server::impl {
}
}

void handle_request(web_server::http_req_t&& req,
web_server::http_res_cb_t&& cb) {
void handle_request(web_server::http_req_t const& req,
web_server::http_res_cb_t const& cb) {
std::cout << "[" << req.method_string() << "] " << req.target() << '\n';
switch (req.method()) {
case http::verb::options: return cb(json_response(req, {}));
Expand Down Expand Up @@ -267,8 +267,7 @@ struct http_server::impl {
}
}
case http::verb::get:
case http::verb::head:
return handle_static(std::move(req), std::move(cb));
case http::verb::head: return handle_static(req, cb);
default:
return cb(json_response(req,
R"({"error": "HTTP method not supported"})",
Expand Down

0 comments on commit 680a92b

Please sign in to comment.