From 48346d7fd7cace2014b24d0875842f53c315724a Mon Sep 17 00:00:00 2001 From: Inhji Date: Fri, 6 Dec 2024 09:44:53 +0100 Subject: [PATCH] change published_at to published --- lib/post.ex | 2 +- lib/properties.ex | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) 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) }}