View Source Franklin.Articles.Commands.UpdateArticle (Franklin v0.1.0)
A command to represent the user-semantic intent of updating an existing Article
entity.
Link to this section Summary
Functions
Attempts to return a UpdateArticle
command using the passed in attributes.
Link to this section Types
@type attrs() :: %{ body: String.t(), id: Ecto.UUID.t(), published_at: DateTime.t(), slug: String.t(), title: String.t() }
@type t() :: %Franklin.Articles.Commands.UpdateArticle{ body: String.t(), id: Ecto.UUID.t(), published_at: DateTime.t() | nil, slug: String.t(), title: String.t() }
Link to this section Functions
@spec new(attrs()) :: {:ok, t()} | {:error, Franklin.ValidationErrorMap.t()}
Attempts to return a UpdateArticle
command using the passed in attributes.
If the attributes are valid, returns: {:ok, command}
. If the attributes are
invalid, returns: {:error, validation_error_map}
.