feat(pastes): add new page to show owned pastes
Signed-off-by: SphericalKat <amolele@gmail.com>
This commit is contained in:
5 files changed
+28
No files matched your search
@@ -21,6 +21,10 @@ defmodule Ketbin.Pastes do
|
||||
Repo.all(Paste)
|
||||
end
|
||||
|
||||
def list_pastes_by_user(user_id) do
|
||||
Repo.all(from(p in Paste, where: p.belongs_to == ^user_id))
|
||||
end
|
||||
|
||||
@doc """
|
||||
Gets a single paste.
|
||||
|
||||
|
||||
Reference in new issue
Block a user