mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-11 09:41:40 -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)
|
immich_search_url(settings['immich_url'], start_date, end_date)
|
||||||
when 'photoprism'
|
when 'photoprism'
|
||||||
photoprism_search_url(settings['photoprism_url'], start_date, end_date)
|
photoprism_search_url(settings['photoprism_url'], start_date, end_date)
|
||||||
else
|
|
||||||
nil # return nil for nil or unknown source
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ class Imports::Create
|
||||||
private
|
private
|
||||||
|
|
||||||
def importer(source)
|
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
|
case source.to_s
|
||||||
when 'google_semantic_history' then GoogleMaps::SemanticHistoryImporter
|
when 'google_semantic_history' then GoogleMaps::SemanticHistoryImporter
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ class Photos::Thumbnail
|
||||||
|
|
||||||
def call
|
def call
|
||||||
raise ArgumentError, 'Photo source cannot be nil' if source.nil?
|
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)
|
HTTParty.get(request_url, headers: headers)
|
||||||
end
|
end
|
||||||
|
|
@ -52,7 +52,7 @@ class Photos::Thumbnail
|
||||||
request_headers
|
request_headers
|
||||||
end
|
end
|
||||||
|
|
||||||
def unsupported_source_error
|
unsupported_source_error unless SUPPORTED_SOURCES.include?(source)
|
||||||
raise ArgumentError, "Unsupported source: #{source}"
|
raise ArgumentError, "Unsupported source: #{source}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue