Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
kelbon committed Jan 18, 2025
1 parent 8047be5 commit 1b2840c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions gtest/http/test_body.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ TEST(http, body_generation) {
request.limit = 100;
request.timeout = 30;
request.allowed_updates = {"message", "edited_channel_post"};
tgbm::http_body req = tgbm::api::make_http_boby(request);
tgbm::http_body req = tgbm::api::make_http_body(request);
EXPECT_EQ(req.content_type, "application/json");
std::string generated_body{(const char*)req.data.data(), req.data.size()};
EXPECT_EQ(generated_body, expected_body);
Expand All @@ -39,7 +39,7 @@ TEST(http, body_generation_hard) {
R"("caption":"example caption","parse_mode":"Markdown","disable_notification":true,)"
R"("reply_markup":{"inline_keyboard":[[{"text":"Button1","callback_data":"hello world"}]]}})";

tgbm::http_body req = tgbm::api::make_http_boby(request);
tgbm::http_body req = tgbm::api::make_http_body(request);
EXPECT_EQ(req.content_type, "application/json");
std::string generated_body{(const char*)req.data.data(), req.data.size()};
EXPECT_EQ(generated_body, expected_body);
Expand Down
4 changes: 2 additions & 2 deletions include/tgbm/api/requests.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ using request_return_t = typename R::return_type;
using default_http_body = application_json_body;

template <tgapi_request R>
[[nodiscard]] http_body make_http_boby(const R& request) {
[[nodiscard]] http_body make_http_body(const R& request) {
static_assert(R::file_info == file_info_e::no || R::file_info == file_info_e::yes ||
R::file_info == file_info_e::maybe);
if constexpr (R::http_method == http_method_e::GET) {
Expand Down Expand Up @@ -79,7 +79,7 @@ template <tgapi_request R>
.path = std::move(path),
.method = R::http_method,
.scheme = scheme_e::HTTPS,
.body = make_http_boby(r),
.body = make_http_body(r),
};
}

Expand Down

0 comments on commit 1b2840c

Please sign in to comment.