mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 17:21:38 -05:00
Fix minor issues
This commit is contained in:
parent
a6f4a931af
commit
d400d3c9fd
3 changed files with 3 additions and 5 deletions
|
|
@ -21,8 +21,6 @@ module TripsHelper
|
|||
immich_search_url(settings['immich_url'], start_date, end_date)
|
||||
when 'photoprism'
|
||||
photoprism_search_url(settings['photoprism_url'], start_date, end_date)
|
||||
else
|
||||
nil # return nil for nil or unknown source
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ class Imports::Create
|
|||
private
|
||||
|
||||
def importer(source)
|
||||
return raise ArgumentError, 'Import source cannot be nil' if source.nil?
|
||||
raise ArgumentError, 'Import source cannot be nil' if source.nil?
|
||||
|
||||
case source.to_s
|
||||
when 'google_semantic_history' then GoogleMaps::SemanticHistoryImporter
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ class Photos::Thumbnail
|
|||
|
||||
def call
|
||||
raise ArgumentError, 'Photo source cannot be nil' if source.nil?
|
||||
raise unsupported_source_error unless SUPPORTED_SOURCES.include?(source)
|
||||
unsupported_source_error unless SUPPORTED_SOURCES.include?(source)
|
||||
|
||||
HTTParty.get(request_url, headers: headers)
|
||||
end
|
||||
|
|
@ -52,7 +52,7 @@ class Photos::Thumbnail
|
|||
request_headers
|
||||
end
|
||||
|
||||
def unsupported_source_error
|
||||
unsupported_source_error unless SUPPORTED_SOURCES.include?(source)
|
||||
raise ArgumentError, "Unsupported source: #{source}"
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue