1 # frozen_string_literal: true
7 json.coordinates [note.lon.to_f, note.lat.to_f]
12 json.url api_note_url(note, :format => params[:format])
15 json.reopen_url reopen_api_note_url(note, :format => params[:format])
17 json.comment_url comment_api_note_url(note, :format => params[:format])
18 json.close_url close_api_note_url(note, :format => params[:format])
21 json.date_created note.created_at.to_s
22 json.status note.status
23 json.closed_at note.closed_at.to_s if note.closed?
25 json.comments(note.comments) do |comment|
26 json.date comment.created_at.to_s
29 json.uid comment.author.id
30 json.user comment.author.display_name
31 json.user_url user_url(:display_name => comment.author.display_name, :only_path => false)
34 json.action comment.event
37 json.text comment.body.to_text
38 json.html comment.body.to_html