feat(pastes): add new page to show owned pastes

Signed-off-by: SphericalKat <amolele@gmail.com>
This commit is contained in:
sphericalkat committed 2024-05-09 19:29:13 +05:30
1 parent f0efa78b89
commit ebd9f7f52c
5 files changed
+28

No files matched your search

+4
View File
@@ -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.