Update the action to get the author's books including aliases.
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user