Add options to disable google calendar

This commit is contained in:
Ari Timonen 2020-03-26 01:33:23 +02:00
parent 1bed2c08a9
commit 63b20f4046
4 changed files with 5 additions and 2 deletions

View file

@ -27,3 +27,4 @@ NEW_RELIC_LICENSE_KEY=
GOOGLE_API_KEY= GOOGLE_API_KEY=
GOOGLE_CALENDAR_ID= GOOGLE_CALENDAR_ID=
GOOGLE_CALENDAR=enabled

View file

@ -46,3 +46,4 @@ NEW_RELIC_LICENSE_KEY=
GOOGLE_API_KEY= GOOGLE_API_KEY=
GOOGLE_CALENDAR_ID= GOOGLE_CALENDAR_ID=
GOOGLE_CALENDAR=enabled

View file

@ -34,3 +34,4 @@ OPENSSL_CONF=/etc/ssl/
GOOGLE_API_KEY= GOOGLE_API_KEY=
GOOGLE_CALENDAR_ID= GOOGLE_CALENDAR_ID=
GOOGLE_CALENDAR=enabled

View file

@ -183,11 +183,11 @@ module ApplicationHelper
end end
def upcoming_matches def upcoming_matches
calendar.upcoming || [] ENV['GOOGLE_CALENDAR'] == "disabled" ? (calendar.upcoming || []) : []
end end
def upcoming_nsltv def upcoming_nsltv
calendar.upcoming_nsltv || [] ENV['GOOGLE_CALENDAR'] == "disabled" ? (calendar.upcoming || []) : []
end end
def gathers_url def gathers_url