Update AuthorRole and BookId for sync Book data.
This commit is contained in:
@@ -25,7 +25,7 @@ defmodule DecentralisedBookIndex.Metadata.AuthorRole do
|
||||
|
||||
create :create do
|
||||
primary? true
|
||||
accept [:order, :role]
|
||||
accept [:id, :order, :role]
|
||||
argument :author_id, :uuid
|
||||
|
||||
change fn changeset, _ ->
|
||||
@@ -75,7 +75,7 @@ defmodule DecentralisedBookIndex.Metadata.AuthorRole do
|
||||
end
|
||||
|
||||
attributes do
|
||||
uuid_primary_key :id
|
||||
uuid_primary_key :id, writable?: true
|
||||
|
||||
attribute :role, :string do
|
||||
allow_nil? true
|
||||
|
||||
@@ -25,12 +25,12 @@ defmodule DecentralisedBookIndex.Metadata.BookId do
|
||||
|
||||
create :create do
|
||||
primary? true
|
||||
accept [:type, :bid, :order]
|
||||
accept [:id, :type, :bid, :order]
|
||||
end
|
||||
|
||||
update :update do
|
||||
primary? true
|
||||
accept [:type, :bid, :order]
|
||||
accept [:id, :type, :bid, :order]
|
||||
end
|
||||
|
||||
read :by_id do
|
||||
@@ -41,7 +41,7 @@ defmodule DecentralisedBookIndex.Metadata.BookId do
|
||||
end
|
||||
|
||||
attributes do
|
||||
uuid_primary_key :id
|
||||
uuid_primary_key :id, writable?: true
|
||||
|
||||
attribute :type, :string do
|
||||
allow_nil? false
|
||||
|
||||
Reference in New Issue
Block a user