mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-23 20:18:00 +01:00
add edit timestamp, edit reason to post and comment json
This commit is contained in:
parent
051a819c9c
commit
724b3a97b1
2 changed files with 24 additions and 6 deletions
|
@ -25,7 +25,9 @@ defmodule PhilomenaWeb.Api.Json.CommentView do
|
|||
author: nil,
|
||||
body: nil,
|
||||
created_at: nil,
|
||||
updated_at: nil
|
||||
updated_at: nil,
|
||||
edited_at: nil,
|
||||
edit_reason: nil
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -41,7 +43,9 @@ defmodule PhilomenaWeb.Api.Json.CommentView do
|
|||
),
|
||||
body: nil,
|
||||
created_at: comment.created_at,
|
||||
updated_at: comment.updated_at
|
||||
updated_at: comment.updated_at,
|
||||
edited_at: nil,
|
||||
edit_reason: nil
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -57,7 +61,9 @@ defmodule PhilomenaWeb.Api.Json.CommentView do
|
|||
),
|
||||
body: comment.body,
|
||||
created_at: comment.created_at,
|
||||
updated_at: comment.updated_at
|
||||
updated_at: comment.updated_at,
|
||||
edited_at: comment.edited_at,
|
||||
edit_reason: comment.edit_reason
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
|
@ -18,7 +18,11 @@ defmodule PhilomenaWeb.Api.Json.Forum.Topic.PostView do
|
|||
id: post.id,
|
||||
user_id: nil,
|
||||
author: nil,
|
||||
body: nil
|
||||
body: nil,
|
||||
created_at: nil,
|
||||
updated_at: nil,
|
||||
edited_at: nil,
|
||||
edit_reason: nil
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -31,7 +35,11 @@ defmodule PhilomenaWeb.Api.Json.Forum.Topic.PostView do
|
|||
do: UserAttributionView.anonymous_name(post),
|
||||
else: post.user.name
|
||||
),
|
||||
body: nil
|
||||
body: nil,
|
||||
created_at: post.created_at,
|
||||
updated_at: post.updated_at,
|
||||
edited_at: nil,
|
||||
edit_reason: nil
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -44,7 +52,11 @@ defmodule PhilomenaWeb.Api.Json.Forum.Topic.PostView do
|
|||
do: UserAttributionView.anonymous_name(post),
|
||||
else: post.user.name
|
||||
),
|
||||
body: post.body
|
||||
body: post.body,
|
||||
created_at: post.created_at,
|
||||
updated_at: post.updated_at,
|
||||
edited_at: post.edited_at,
|
||||
edit_reason: post.edit_reason
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue