fix compile issue

This commit is contained in:
Jay Robson 2024-05-01 17:40:20 +10:00
parent 5a5e65d530
commit 36fe41f0da
1 changed files with 4 additions and 2 deletions

View File

@ -32,7 +32,8 @@ struct page_handler
void operator()(const httplib::Request& req, httplib::Response& res)
{
std::string data_content = Files::load(path);
std::string page = std::vformat(DATA_INDEX, std::make_format_args(get_theme(req), data_content));
std::string theme = get_theme(req);
std::string page = std::vformat(DATA_INDEX, std::make_format_args(theme, data_content));
res.set_content(page, "text/html");
}
};
@ -72,7 +73,8 @@ void put_contact(const httplib::Request& req, httplib::Response& res)
void error_handler(const httplib::Request& req, httplib::Response& res)
{
std::string page = std::vformat(DATA_INDEX, std::make_format_args(get_theme(req), DATA_ERROR));
std::string theme = get_theme(req);
std::string page = std::vformat(DATA_INDEX, std::make_format_args(theme, DATA_ERROR));
res.set_content(page, "text/html");
}