mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-01-19 22:27:59 +01:00
Add timestamps to the API's comment view (#67)
* Add timestamps to the API's comment view * Change property name to created_at
This commit is contained in:
parent
0b0a5b1b42
commit
051a819c9c
1 changed files with 9 additions and 3 deletions
|
@ -23,7 +23,9 @@ defmodule PhilomenaWeb.Api.Json.CommentView do
|
|||
image_id: comment.image_id,
|
||||
user_id: nil,
|
||||
author: nil,
|
||||
body: nil
|
||||
body: nil,
|
||||
created_at: nil,
|
||||
updated_at: nil
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -37,7 +39,9 @@ defmodule PhilomenaWeb.Api.Json.CommentView do
|
|||
do: UserAttributionView.anonymous_name(comment),
|
||||
else: comment.user.name
|
||||
),
|
||||
body: nil
|
||||
body: nil,
|
||||
created_at: comment.created_at,
|
||||
updated_at: comment.updated_at
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -51,7 +55,9 @@ defmodule PhilomenaWeb.Api.Json.CommentView do
|
|||
do: UserAttributionView.anonymous_name(comment),
|
||||
else: comment.user.name
|
||||
),
|
||||
body: comment.body
|
||||
body: comment.body,
|
||||
created_at: comment.created_at,
|
||||
updated_at: comment.updated_at
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue