Update the action to get the author's books including aliases.
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-03-13 19:14:15 +02:00
parent d6eef962de
commit 9f15260275
2 changed files with 37 additions and 1 deletions
@@ -83,8 +83,10 @@ defmodule DecentralisedBookIndex.Metadata.Book do
prepare fn query, context ->
author = query.arguments.author
{:ok, author_ids} = Metadata.get_author_ids(author)
Metadata.Book
|> Ash.Query.filter(expr(exists(author_roles, author_id == ^author.id)))
|> Ash.Query.filter(expr(exists(author_roles, author_id in ^author_ids)))
end
end
end