fix for pagination
This commit is contained in:
parent
17207fc0b8
commit
50ed5116f7
|
|
@ -145,7 +145,7 @@ class ApiSearchController < ApiController
|
||||||
#bm = Benchmark.measure do
|
#bm = Benchmark.measure do
|
||||||
result = users_latency_data(latency_good, latency_fair, latency_high, filter_params, offset, limit)
|
result = users_latency_data(latency_good, latency_fair, latency_high, filter_params, offset, limit)
|
||||||
@latency_data = result[:data]
|
@latency_data = result[:data]
|
||||||
@offset = result[:offset]
|
@nextOffset = result[:next]
|
||||||
|
|
||||||
user_ids = @latency_data.map{ |l_data| l_data[:user_id] }
|
user_ids = @latency_data.map{ |l_data| l_data[:user_id] }
|
||||||
#end
|
#end
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ module LatencyHelper
|
||||||
}
|
}
|
||||||
}.uniq
|
}.uniq
|
||||||
|
|
||||||
return {data: latency_data, offset: nextOffset}
|
return {data: latency_data, next: nextOffset}
|
||||||
else
|
else
|
||||||
logger.debug("Latency response failed: #{response}")
|
logger.debug("Latency response failed: #{response}")
|
||||||
Bugsnag.notify("LatencyResponseFailed") do |report|
|
Bugsnag.notify("LatencyResponseFailed") do |report|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
object @search
|
object @search
|
||||||
|
|
||||||
node :offset do
|
node :offset do
|
||||||
@offset
|
@nextOffset
|
||||||
end
|
end
|
||||||
|
|
||||||
# node :page_count do |foo|
|
# node :page_count do |foo|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue