From e6178f4c1dfc20a2686f7a2f5947c506f5a37514 Mon Sep 17 00:00:00 2001 From: Daniel Nitsikopoulos Date: Sat, 24 Feb 2024 15:44:29 +1100 Subject: [PATCH] Fix location parsing --- slices/micropub/request_parser.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slices/micropub/request_parser.rb b/slices/micropub/request_parser.rb index 310b420..273bb7b 100644 --- a/slices/micropub/request_parser.rb +++ b/slices/micropub/request_parser.rb @@ -139,7 +139,7 @@ module Micropub location = if params.dig(:properties, :location) params.dig(:properties, :location).first[:properties] elsif checkin.dig(:properties, :latitude) && checkin.dig(:properties, :longitude) - {latitude: checkin.dig(:properties, :latitude).first, longitude: checkin.dig(:properties, :longitude).first} + {latitude: checkin.dig(:properties, :latitude), longitude: checkin.dig(:properties, :longitude)} end new_params[:photos] = params.dig(:properties, :photo)&.map { |p| {value: p, alt: new_params[:name]} } || []