summaryrefslogtreecommitdiff
path: root/include/tgbot/net/TgWebhookServer.h
diff options
context:
space:
mode:
authorOleg Morozenkov <omorozenkov@gmail.com>2018-06-17 22:03:01 +0300
committerGitHub <noreply@github.com>2018-06-17 22:03:01 +0300
commita854dd975f13e71338c80d85717be6fb6e8c185a (patch)
tree6db1b94ea9ca29b72f7788f7f8c62c2ae20222c2 /include/tgbot/net/TgWebhookServer.h
parentc8d40dccabaaa406faed6c0797a92bac811c9d0f (diff)
parentb89c8f2fc73e25f1740c191faf0c7e8b9c18c9b9 (diff)
Merge pull request #67 from JellyBrick/parser_refactor
Code optimization
Diffstat (limited to 'include/tgbot/net/TgWebhookServer.h')
-rw-r--r--include/tgbot/net/TgWebhookServer.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/tgbot/net/TgWebhookServer.h b/include/tgbot/net/TgWebhookServer.h
index 9352e82..696d126 100644
--- a/include/tgbot/net/TgWebhookServer.h
+++ b/include/tgbot/net/TgWebhookServer.h
@@ -37,7 +37,7 @@ public:
TgWebhookServer(std::shared_ptr<boost::asio::basic_socket_acceptor<Protocol>> acceptor, const typename HttpServer<Protocol>::ServerHandler& handler) = delete;
TgWebhookServer(std::shared_ptr<boost::asio::basic_socket_acceptor<Protocol>> acceptor, const std::string& path, const EventHandler* eventHandler) :
- HttpServer<Protocol>(acceptor, [eventHandler, &path](const std::string& data, const std::map<std::string, std::string>& headers) -> std::string {
+ HttpServer<Protocol>(acceptor, [eventHandler, &path](const std::string& data, const std::unordered_map<std::string, std::string>& headers) -> std::string {
if (headers.at("method") == "POST" && headers.at("path") == path) {
eventHandler->handleUpdate(TgTypeParser::getInstance().parseJsonAndGetUpdate(TgTypeParser::getInstance().parseJson(data)));
}