api: night values were not taken from the proper database since we were checking against path_info instead of get_qs_value
This commit is contained in:
parent
e081a2e95c
commit
ea9f713f90
|
@ -48,7 +48,7 @@ content_types_provided(ReqData, State) ->
|
||||||
{[{"application/json", to_json}], ReqData, State}.
|
{[{"application/json", to_json}], ReqData, State}.
|
||||||
|
|
||||||
to_json(ReqData, #state{rrdSensor = RrdSensor, rrdTime = RrdTime, rrdFactor = RrdFactor, jsonpCallback = JsonpCallback} = State) ->
|
to_json(ReqData, #state{rrdSensor = RrdSensor, rrdTime = RrdTime, rrdFactor = RrdFactor, jsonpCallback = JsonpCallback} = State) ->
|
||||||
case wrq:path_info(interval, ReqData) of
|
case wrq:get_qs_value("interval", ReqData) of
|
||||||
"night" -> Path = "var/data/night/";
|
"night" -> Path = "var/data/night/";
|
||||||
_Interval -> Path = "var/data/base/"
|
_Interval -> Path = "var/data/base/"
|
||||||
end,
|
end,
|
||||||
|
|
Loading…
Reference in New Issue