From 36fe41f0da2d4fff57843dae90d9e42e4e46fd48 Mon Sep 17 00:00:00 2001 From: Jay Robson Date: Wed, 1 May 2024 17:40:20 +1000 Subject: [PATCH] fix compile issue --- src/main.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index d4b2ebd..bdd97d5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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"); }