Fix order of args for favorite/2
This commit is contained in:
parent
b1d3348331
commit
7e37882cf7
27 changed files with 90 additions and 90 deletions
|
|
@ -247,8 +247,8 @@ defmodule Pleroma.Web.CommonAPI do
|
|||
end
|
||||
end
|
||||
|
||||
@spec favorite(User.t(), String.t()) :: {:ok, Activity.t()} | {:error, any()}
|
||||
def favorite(%User{} = user, id) do
|
||||
@spec favorite(String.t(), User.t()) :: {:ok, Activity.t()} | {:error, any()}
|
||||
def favorite(id, %User{} = user) do
|
||||
case favorite_helper(user, id) do
|
||||
{:ok, _} = res ->
|
||||
res
|
||||
|
|
|
|||
|
|
@ -357,7 +357,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusController do
|
|||
conn,
|
||||
_
|
||||
) do
|
||||
with {:ok, _fav} <- CommonAPI.favorite(user, activity_id),
|
||||
with {:ok, _fav} <- CommonAPI.favorite(activity_id, user),
|
||||
%Activity{} = activity <- Activity.get_by_id(activity_id) do
|
||||
try_render(conn, "show.json", activity: activity, for: user, as: :activity)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue