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