Commit 0051cbd7 authored by Alessio Netti's avatar Alessio Netti
Browse files

Removing sensor name conversion in REST API

- This feature is not needed anymore in the new REST API design, and
forward slashes are parsed correctly without additional logic
parent a5292b06
......@@ -544,7 +544,7 @@ void AnalyticsManager::PUT_analytics_compute(endpointArgs) {
const std::string plugin = getQuery("plugin", queries);
const std::string analyzer = getQuery("analyzer", queries);
std::string unit = MQTTChecker::nameToTopic(getQuery("unit", queries));
std::string unit = getQuery("unit", queries);
if (plugin == "" || analyzer == "") {
res.body() = "Request malformed: plugin or analyzer query missing\n";
......
......@@ -35,7 +35,7 @@ void CARestAPI::GET_help(endpointArgs) {
}
void CARestAPI::GET_average(endpointArgs) {
const std::string sensor = MQTTChecker::nameToTopic(getQuery("sensor", queries));
const std::string sensor = nameToTopic(getQuery("sensor", queries);
const std::string interval = getQuery("interval", queries);
if (sensor == "") {
......
......@@ -107,7 +107,7 @@ void RestAPI::GET_sensors(endpointArgs) {
void RestAPI::GET_average(endpointArgs) {
const std::string plugin = getQuery("plugin", queries);
const std::string sensor = MQTTChecker::nameToTopic(getQuery("sensor", queries));
const std::string sensor = getQuery("sensor", queries);
const std::string interval = getQuery("interval", queries);
if (plugin == "" || sensor == "") {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment