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:
Bart Van Der Meerssche 2010-04-27 14:22:25 +02:00
parent e081a2e95c
commit ea9f713f90
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ content_types_provided(ReqData, State) ->
{[{"application/json", to_json}], ReqData, 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/";
_Interval -> Path = "var/data/base/"
end,