mirror of
https://github.com/Syping/dtranslatebot.git
synced 2025-12-14 23:56:26 +01:00
CMakeLists.txt and Webhook push improvements
This commit is contained in:
parent
0e205682a3
commit
ccd2736c63
8 changed files with 50 additions and 51 deletions
|
|
@ -49,7 +49,7 @@ void bot::message_queue::run(bot::settings::settings *settings, bot::submit_queu
|
|||
m_mutex.unlock();
|
||||
|
||||
settings->lock();
|
||||
bot::settings::translate *translate = settings->get_translate();
|
||||
const bot::settings::translate *translate = settings->get_translate();
|
||||
const std::string tr_apiKey = translate->apiKey;
|
||||
const std::string tr_hostname = translate->hostname;
|
||||
const uint16_t tr_port = translate->port;
|
||||
|
|
@ -68,8 +68,9 @@ void bot::message_queue::run(bot::settings::settings *settings, bot::submit_queu
|
|||
if (!tr_apiKey.empty())
|
||||
json_body.emplace("apiKey", tr_apiKey);
|
||||
|
||||
dpp::http_headers http_headers;
|
||||
http_headers.emplace("Content-Type", "application/json");
|
||||
const dpp::http_headers http_headers = {
|
||||
{"Content-Type", "application/json"}
|
||||
};
|
||||
|
||||
std::string tr_message = message.message;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue