diff --git a/lib/decentralised_book_index/metadata/publisher.ex b/lib/decentralised_book_index/metadata/publisher.ex index 315faec..2d2f9c3 100644 --- a/lib/decentralised_book_index/metadata/publisher.ex +++ b/lib/decentralised_book_index/metadata/publisher.ex @@ -41,7 +41,7 @@ defmodule DecentralisedBookIndex.Metadata.Publisher do end actions do - defaults [:read, :update, :destroy] + defaults [:read, :destroy] create :create do primary? true @@ -69,6 +69,11 @@ defmodule DecentralisedBookIndex.Metadata.Publisher do pagination offset?: true, default_limit: 10 end + update :update do + primary? true + accept [:name] + end + update :sync do accept [:name, :inserted_at, :updated_at, :dbi_server_id] end diff --git a/lib/decentralised_book_index_web/live/publisher_live/form_component.ex b/lib/decentralised_book_index_web/live/publisher_live/form_component.ex index 00d1890..d58b63d 100644 --- a/lib/decentralised_book_index_web/live/publisher_live/form_component.ex +++ b/lib/decentralised_book_index_web/live/publisher_live/form_component.ex @@ -20,6 +20,7 @@ defmodule DecentralisedBookIndexWeb.PublisherLive.FormComponent do <.input field={@form[:name]} type="text" label="Name" /> <% end %> <%= if @form.source.type == :update do %> + <.input field={@form[:name]} type="text" label="Name" /> <% end %> <:actions>