mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 17:21:38 -05:00
22 lines
381 B
Ruby
22 lines
381 B
Ruby
|
|
# frozen_string_literal: true
|
||
|
|
|
||
|
|
class DawarichSettings
|
||
|
|
class << self
|
||
|
|
def reverse_geocoding_enabled?
|
||
|
|
photon_enabled? || geoapify_enabled?
|
||
|
|
end
|
||
|
|
|
||
|
|
def photon_enabled?
|
||
|
|
PHOTON_API_HOST.present?
|
||
|
|
end
|
||
|
|
|
||
|
|
def photon_uses_komoot_io?
|
||
|
|
PHOTON_API_HOST == 'photon.komoot.io'
|
||
|
|
end
|
||
|
|
|
||
|
|
def geoapify_enabled?
|
||
|
|
GEOAPIFY_API_KEY.present?
|
||
|
|
end
|
||
|
|
end
|
||
|
|
end
|