Add map to trip view

This commit is contained in:
2023-08-27 17:29:32 +10:00
parent c211b12890
commit d34e91dafe
3 changed files with 21 additions and 3 deletions

View File

@@ -12,6 +12,14 @@ module Adamantium
end
end
expose :places do |posts|
posts.map do |post|
next if post.location.nil?
p = Decorators::Posts::Decorator.new(post)
[p.lon, p.lat]
end.compact
end
expose :trip do |id:|
trip_repo.fetch!(id)
end