Use map instead of flat_map

This commit is contained in:
Eugene Burmakin 2024-09-08 17:06:06 +02:00
parent 031c901001
commit d2a8180a7f

View file

@ -36,7 +36,7 @@ class Immich::ImportGeodata
def retrieve_immich_data
1970.upto(Date.today.year).flat_map do |year|
(1..12).flat_map do |month_number|
(1..12).map do |month_number|
url = "#{immich_api_base_url}/timeline/bucket?size=MONTH&timeBucket=#{year}-#{month_number}-01"
JSON.parse(HTTParty.get(url, headers:).body)