Remove rawEasyMem

This commit is contained in:
Tyler Perkins 2022-04-29 13:08:43 -04:00
parent cb944e5623
commit 805129eeb6
3 changed files with 4 additions and 17 deletions

View File

@ -80,8 +80,3 @@ bool memory::getEasyMem(crow::json::wvalue& ret){
return true; return true;
} }
bool memory::getRawEasyMem(std::string& ret){
std::ifstream f (procmempath);
}

View File

@ -17,5 +17,4 @@ namespace memory{
bool getProcMem(crow::json::wvalue&); bool getProcMem(crow::json::wvalue&);
bool getRawProcMem(std::string&); bool getRawProcMem(std::string&);
bool getEasyMem(crow::json::wvalue&); bool getEasyMem(crow::json::wvalue&);
bool getRawEasyMem(std::string&);
} }

View File

@ -24,19 +24,12 @@ void setRoutes(crow::SimpleApp& app){
} }
}); });
CROW_ROUTE(app, "/mem")([](const crow::request& req){ CROW_ROUTE(app, "/mem")([](){
bool status; 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; crow::json::wvalue json;
status = memory::getEasyMem(json); status = memory::getEasyMem(json);
return crow::response(status ? 200 : 503, json.dump()); return crow::response(status ? 200 : 503, json.dump());
}
}); });