diff --git a/lib/post.ex b/lib/post.ex index d4cbe30..2d43008 100644 --- a/lib/post.ex +++ b/lib/post.ex @@ -5,6 +5,6 @@ defmodule PlugIndie.Post do :like_of, :title, :type, - :published_at + :published ] end diff --git a/lib/properties.ex b/lib/properties.ex index dbdf665..9796dc4 100644 --- a/lib/properties.ex +++ b/lib/properties.ex @@ -4,14 +4,13 @@ defmodule PlugIndie.Properties do content = get_content(properties) title = get_title(properties) published = is_published?(properties) - published_at = if published, do: DateTime.utc_now(), else: nil case type do :note -> {:ok, %PlugIndie.Post{ type: type, - published_at: published_at, + published: published, content: content }} @@ -19,7 +18,7 @@ defmodule PlugIndie.Properties do {:ok, %PlugIndie.Post{ type: type, - published_at: published_at, + published: published, title: title, content: content }} @@ -28,7 +27,7 @@ defmodule PlugIndie.Properties do {:ok, %PlugIndie.Post{ type: type, - published_at: published_at, + published: published, title: title, content: content, bookmark_of: get_bookmarked_url(properties) @@ -38,7 +37,7 @@ defmodule PlugIndie.Properties do {:ok, %PlugIndie.Post{ type: type, - published_at: published_at, + published: published, like_of: get_liked_url(properties) }}