order channel notes by published_at date

This commit is contained in:
inhji 2023-03-27 09:17:22 +02:00
parent 7b8b48eecb
commit 70366d8d7f

View file

@ -9,7 +9,9 @@ defmodule Chiya.Channels do
alias Chiya.Notes.Note
@preloads [:notes]
@public_preloads [notes: (from n in Note, where: not is_nil(n.published_at))]
@public_preloads [notes: (from n in Note,
where: not is_nil(n.published_at),
order_by: [desc: n.published_at])]
@doc """
Returns the list of channels.