@@ -35,6 +35,13 @@ defmodule Mobilizon.Medias do
|
||||
@spec get_media_by_uuid(String.t()) :: Media.t() | nil
|
||||
def get_media_by_uuid(uuid), do: Repo.get_by(Media, uuid: uuid)
|
||||
|
||||
@doc """
|
||||
Get a single media by uuid.
|
||||
Raises `Ecto.NoResultsError` if the media does not exist.
|
||||
"""
|
||||
@spec get_media_by_uuid!(String.t()) :: Media.t() | nil
|
||||
def get_media_by_uuid!(uuid), do: Repo.get_by!(Media, uuid: uuid)
|
||||
|
||||
@doc """
|
||||
Get a media by its URL.
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user