fix error
This commit is contained in:
parent
e6484f4a69
commit
fff118ac71
|
@ -134,10 +134,10 @@ module OrbitBackendHelper
|
||||||
visitors_this_month = Rails.cache.fetch("visitors_this_month", expires_in: 1.day) do
|
visitors_this_month = Rails.cache.fetch("visitors_this_month", expires_in: 1.day) do
|
||||||
display_visitors(created_at: {'$gte' => Time.now.beginning_of_month})
|
display_visitors(created_at: {'$gte' => Time.now.beginning_of_month})
|
||||||
end
|
end
|
||||||
|
visitors_this_month
|
||||||
else
|
else
|
||||||
@result_of_thirty_day[0..((Time.now-Time.now.beginning_of_month)/86400).floor].map{|v| v['count']}.reduce{|v,x| v+x}
|
@result_of_thirty_day[0..((Time.now-Time.now.beginning_of_month)/86400).floor].map{|v| v['count']}.reduce{|v,x| v+x}
|
||||||
end
|
end
|
||||||
visitors_this_month
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def display_visitors_this_year
|
def display_visitors_this_year
|
||||||
|
|
Loading…
Reference in New Issue