diff --git a/src/main.cpp b/src/main.cpp index 9debdc7..4eda40c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -96,7 +96,7 @@ class ServerResources { } static void doTerminalUpgrade() { - system("do-terminal-update.sh"); + system(UPGRADE_COMMAND); } public: @@ -173,7 +173,7 @@ public: http::server::stockReply(http::server::bad_request, rep); } })); - s.resources.emplace_back(std::make_unique("/logout", [this](const auto& req, auto& rep) { + s.resources.emplace_back(std::make_unique("/logout", [](const auto& req, auto& rep) { if (req.method == "GET") { http::server::httpRedirect(rep, "/login"); rep.headers.push_back({.name = "Set-Cookie", .value = http::auth::jwt::EMPTY_AUTH_COOKIE}); @@ -410,7 +410,7 @@ public: } })); - s.resources.emplace_back(std::make_unique("/api/reboot", this->auth, 0, [this](const auto& req, auto& rep) { + s.resources.emplace_back(std::make_unique("/api/reboot", this->auth, 0, [](const auto& req, auto& rep) { if (req.method != "POST") { http::server::stockReply(http::server::bad_request, rep); } @@ -434,7 +434,7 @@ public: system(REBOOT_COMMAND); })); - s.resources.emplace_back(std::make_unique("/api/firmwareUpdate", this->auth, http::auth::User::UPDATE_FIRMWARE, [this](const auto& req, auto& rep) { + s.resources.emplace_back(std::make_unique("/api/firmwareUpdate", this->auth, http::auth::User::UPDATE_FIRMWARE, [](const auto& req, auto& rep) { if (req.method != "PUT") { http::server::stockReply(http::server::bad_request, rep); } diff --git a/src/server/request_parser.hpp b/src/server/request_parser.hpp index e5ccbca..48256f1 100644 --- a/src/server/request_parser.hpp +++ b/src/server/request_parser.hpp @@ -8,7 +8,7 @@ namespace http::server { - struct Request; + class Request; /// Parser for incoming requests. class RequestParser {