mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-23 12:08:00 +01:00
Fix documentation errors
This commit is contained in:
parent
bd4dfd9016
commit
dbbc067679
3 changed files with 15 additions and 3 deletions
|
@ -162,7 +162,7 @@ defmodule Philomena.Adverts do
|
|||
iex> update_advert_image(advert, %{image: new_value})
|
||||
{:ok, %Advert{}}
|
||||
|
||||
iex> update_advert(advert, %{image: bad_value})
|
||||
iex> update_advert_image(advert, %{image: bad_value})
|
||||
{:error, %Ecto.Changeset{}}
|
||||
|
||||
"""
|
||||
|
|
|
@ -20,7 +20,7 @@ defmodule Philomena.Autocomplete do
|
|||
|
||||
## Examples
|
||||
|
||||
iex> get_artist_link()
|
||||
iex> get_autocomplete()
|
||||
nil
|
||||
|
||||
iex> get_autocomplete()
|
||||
|
|
|
@ -84,7 +84,7 @@ defmodule Philomena.Badges do
|
|||
end
|
||||
|
||||
@doc """
|
||||
Updates a badge.
|
||||
Updates a badge without updating its image.
|
||||
|
||||
## Examples
|
||||
|
||||
|
@ -101,6 +101,18 @@ defmodule Philomena.Badges do
|
|||
|> Repo.update()
|
||||
end
|
||||
|
||||
@doc """
|
||||
Updates the image for a badge.
|
||||
|
||||
## Examples
|
||||
|
||||
iex> update_badge_image(badge, %{image: new_value})
|
||||
{:ok, %Badge{}}
|
||||
|
||||
iex> update_badge_image(badge, %{image: bad_value})
|
||||
{:error, %Ecto.Changeset{}}
|
||||
|
||||
"""
|
||||
def update_badge_image(%Badge{} = badge, attrs) do
|
||||
badge
|
||||
|> Badge.changeset(attrs)
|
||||
|
|
Loading…
Reference in a new issue