From 805129eeb6d147b06785df7a627fb75dd6ec044d Mon Sep 17 00:00:00 2001 From: Tyler Perkins Date: Fri, 29 Apr 2022 13:08:43 -0400 Subject: [PATCH] Remove rawEasyMem --- src/components/memory.cpp | 5 ----- src/components/memory.hpp | 1 - src/routes.cpp | 15 ++++----------- 3 files changed, 4 insertions(+), 17 deletions(-) diff --git a/src/components/memory.cpp b/src/components/memory.cpp index cb0f1cf..e118061 100644 --- a/src/components/memory.cpp +++ b/src/components/memory.cpp @@ -80,8 +80,3 @@ bool memory::getEasyMem(crow::json::wvalue& ret){ return true; } - -bool memory::getRawEasyMem(std::string& ret){ - std::ifstream f (procmempath); - -} diff --git a/src/components/memory.hpp b/src/components/memory.hpp index 32b0985..2609f7c 100644 --- a/src/components/memory.hpp +++ b/src/components/memory.hpp @@ -17,5 +17,4 @@ namespace memory{ bool getProcMem(crow::json::wvalue&); bool getRawProcMem(std::string&); bool getEasyMem(crow::json::wvalue&); - bool getRawEasyMem(std::string&); } diff --git a/src/routes.cpp b/src/routes.cpp index daadbc9..f074db5 100644 --- a/src/routes.cpp +++ b/src/routes.cpp @@ -24,19 +24,12 @@ void setRoutes(crow::SimpleApp& app){ } }); - CROW_ROUTE(app, "/mem")([](const crow::request& req){ + CROW_ROUTE(app, "/mem")([](){ bool status; - std::string accept = req.get_header_value("Accept"); - std::transform(accept.begin(), accept.end(), accept.begin(), ::tolower); - - if(accept == "text/plain"){ - accept.clear(); - } else { - crow::json::wvalue json; - status = memory::getEasyMem(json); - return crow::response(status ? 200 : 503, json.dump()); - } + crow::json::wvalue json; + status = memory::getEasyMem(json); + return crow::response(status ? 200 : 503, json.dump()); });