Use datetime with TZ for posts timestamps
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
93cecbe49c
commit
86e1e84247
@ -17,8 +17,8 @@ defmodule Mobilizon.GraphQL.Schema.PostType do
|
|||||||
field(:attributed_to, :actor, description: "The post's group")
|
field(:attributed_to, :actor, description: "The post's group")
|
||||||
field(:visibility, :post_visibility, description: "The post's visibility")
|
field(:visibility, :post_visibility, description: "The post's visibility")
|
||||||
field(:publish_at, :datetime, description: "When the post was published")
|
field(:publish_at, :datetime, description: "When the post was published")
|
||||||
field(:inserted_at, :naive_datetime, description: "The post's creation date")
|
field(:inserted_at, :datetime, description: "The post's creation date")
|
||||||
field(:updated_at, :naive_datetime, description: "The post's last update date")
|
field(:updated_at, :datetime, description: "The post's last update date")
|
||||||
|
|
||||||
field(:tags, list_of(:tag),
|
field(:tags, list_of(:tag),
|
||||||
resolve: &Tag.list_tags_for_post/3,
|
resolve: &Tag.list_tags_for_post/3,
|
||||||
|
@ -61,7 +61,7 @@ defmodule Mobilizon.Posts.Post do
|
|||||||
belongs_to(:picture, Picture, on_replace: :update)
|
belongs_to(:picture, Picture, on_replace: :update)
|
||||||
many_to_many(:tags, Tag, join_through: "posts_tags", on_replace: :delete)
|
many_to_many(:tags, Tag, join_through: "posts_tags", on_replace: :delete)
|
||||||
|
|
||||||
timestamps()
|
timestamps(type: :utc_datetime)
|
||||||
end
|
end
|
||||||
|
|
||||||
@required_attrs [
|
@required_attrs [
|
||||||
|
Loading…
Reference in New Issue
Block a user