Pleroma.Web.PleromaAPI.MascotController: fix dialyzer error due to bad error match
lib/pleroma/web/pleroma_api/controllers/mascot_controller.ex:37:pattern_match The pattern can never match the type. Pattern: {:content_type, _} Type: {:error, _} ________________________________________________________________________________ lib/pleroma/web/pleroma_api/controllers/mascot_controller.ex:40:pattern_match The pattern can never match the type. Pattern: {:upload, {:error, _}} Type: {:error, _}
This commit is contained in:
parent
ed2f8e45e9
commit
5e8bedcca0
|
@ -28,7 +28,7 @@ def update(
|
||||||
_
|
_
|
||||||
) do
|
) do
|
||||||
with {:content_type, "image" <> _} <- {:content_type, file.content_type},
|
with {:content_type, "image" <> _} <- {:content_type, file.content_type},
|
||||||
{:ok, object} <- ActivityPub.upload(file, actor: User.ap_id(user)) do
|
{_, {:ok, object}} <- {:upload, ActivityPub.upload(file, actor: User.ap_id(user))} do
|
||||||
attachment = render_attachment(object)
|
attachment = render_attachment(object)
|
||||||
{:ok, _user} = User.mascot_update(user, attachment)
|
{:ok, _user} = User.mascot_update(user, attachment)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue