]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/api/changesets/_changeset.json.jbuilder
Add changeset comment search api json format
[rails.git] / app / views / api / changesets / _changeset.json.jbuilder
index 0d76ed90c61eaccaf257b6d0bf0ac306dc314b9d..7001a95e854ababb5a4293a4c011b5e8c53f7baa 100644 (file)
@@ -21,14 +21,8 @@ end
 
 json.tags changeset.tags unless changeset.tags.empty?
 
-if @include_discussion
-  json.comments(changeset.comments) do |comment|
-    json.id comment.id
-    json.date comment.created_at.xmlschema
-    if comment.author.data_public?
-      json.uid comment.author.id
-      json.user comment.author.display_name
-    end
-    json.text comment.body
+if @comments
+  json.comments(@comments) do |comment|
+    json.partial! comment
   end
 end