Skip to content

Commit

Permalink
Feat:fregment update
Browse files Browse the repository at this point in the history
  • Loading branch information
AfonsoMartins26 committed Sep 18, 2024
1 parent 9942148 commit 3f11589
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cesium_link/links.ex
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ defmodule CesiumLink.Links do
"""
def list_unarchived_links_by_index do
Link
|> where([l], fragment("? > now()", l.publish_at))
|> where([l], fragment("? <= now() OR ? IS NULL", l.publish_at, l.publish_at))
|> where([l], l.archived == false)
|> order_by([l], asc: l.index)
|> Repo.all()
Expand Down
1 change: 1 addition & 0 deletions lib/cesium_link_web/live/link_live/form_component.ex
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ defmodule CesiumLinkWeb.LinkLive.FormComponent do
<.input field={@form[:emoji]} type="emoji" label="Emoji" />
<.input field={@form[:url]} type="text" label="URL" />
<.input field={@form[:attention]} type="checkbox" label="Attention" />
<.input field={@form[:publish_at]} type="datetime-local" label="Publish At" />
<:actions>
<.button phx-disable-with="Saving...">Save Link</.button>
</:actions>
Expand Down

0 comments on commit 3f11589

Please sign in to comment.