Add comment ids to changeset discussion api responses

This commit is contained in:
Anton Khorev 2023-09-10 17:10:31 +03:00
parent 0e21afc565
commit 4b92988555
3 changed files with 25 additions and 1 deletions

View file

@ -28,6 +28,7 @@ xml.changeset(attrs) do |changeset_xml_node|
changeset_xml_node.discussion do |discussion_xml_node|
changeset.comments.includes(:author).each do |comment|
cattrs = {
"id" => comment.id,
"date" => comment.created_at.xmlschema
}
if comment.author.data_public?