Add the search by bids for Book Index LiveView.

This commit is contained in:
2025-04-04 11:18:40 +03:00
parent 73f69a72a5
commit 0150095233
2 changed files with 38 additions and 3 deletions
@@ -180,6 +180,15 @@ defmodule DecentralisedBookIndex.Metadata.Book do
pagination offset?: true, default_limit: 10
end
read :search_by_bid do
argument :type, :string, allow_nil?: false
argument :bid, :string, allow_nil?: false
filter expr(exists(bids, type == ^arg(:type) and contains(bid, ^arg(:bid))))
pagination offset?: true, default_limit: 10
end
update :update do
primary? true
require_atomic? false