Add the attribute for a avatar image url for Author.
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -58,6 +58,7 @@ defmodule DecentralisedBookIndex.Metadata do
|
||||
define :get_author_alternative_names, args: [:author], action: :get_alternative_names
|
||||
define :search_author, action: :search, args: [:name]
|
||||
define :update_author, action: :update
|
||||
define :assign_author_avatar_image, args: [:avatar_url], action: :assign_avatar_image
|
||||
define :destroy_author, action: :destroy
|
||||
end
|
||||
|
||||
|
||||
@@ -108,6 +108,10 @@ defmodule DecentralisedBookIndex.Metadata.Author do
|
||||
|
||||
pagination offset?: true, default_limit: 10
|
||||
end
|
||||
|
||||
update :assign_avatar_image do
|
||||
accept [:avatar_url]
|
||||
end
|
||||
end
|
||||
|
||||
attributes do
|
||||
@@ -123,6 +127,11 @@ defmodule DecentralisedBookIndex.Metadata.Author do
|
||||
public? true
|
||||
end
|
||||
|
||||
attribute :avatar_url, :string do
|
||||
allow_nil? true
|
||||
public? true
|
||||
end
|
||||
|
||||
timestamps()
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user