fix error

This commit is contained in:
chiu 2020-03-03 21:27:28 +08:00
parent e6484f4a69
commit fff118ac71
1 changed files with 1 additions and 1 deletions

View File

@ -134,10 +134,10 @@ module OrbitBackendHelper
visitors_this_month = Rails.cache.fetch("visitors_this_month", expires_in: 1.day) do
display_visitors(created_at: {'$gte' => Time.now.beginning_of_month})
end
visitors_this_month
else
@result_of_thirty_day[0..((Time.now-Time.now.beginning_of_month)/86400).floor].map{|v| v['count']}.reduce{|v,x| v+x}
end
visitors_this_month
end
def display_visitors_this_year