Add the search by bids for Book Index LiveView.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user