order in db

This commit is contained in:
2022-02-15 19:55:48 -05:00
parent 0b0e1cc639
commit 7110a2db21
7 changed files with 23 additions and 14 deletions

View File

@ -20,7 +20,7 @@ defmodule Cannery.Invites do
"""
@spec list_invites(User.t()) :: [Invite.t()]
def list_invites(%User{role: :admin}) do
Repo.all(Invite)
Repo.all(from i in Invite, order_by: i.name)
end
@doc """