change published_at to published
This commit is contained in:
parent
e1d37bdea0
commit
48346d7fd7
2 changed files with 5 additions and 6 deletions
|
@ -5,6 +5,6 @@ defmodule PlugIndie.Post do
|
|||
:like_of,
|
||||
:title,
|
||||
:type,
|
||||
:published_at
|
||||
:published
|
||||
]
|
||||
end
|
||||
|
|
|
@ -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)
|
||||
}}
|
||||
|
||||
|
|
Loading…
Reference in a new issue