Fix subscription endpoint return formats
This commit is contained in:
parent
007762e767
commit
23c4f49494
@ -60,15 +60,16 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPI do
|
|||||||
end
|
end
|
||||||
|
|
||||||
def subscribe(%User{} = subscriber, params) do
|
def subscribe(%User{} = subscriber, params) do
|
||||||
with {:ok, %User{} = subscribed} <- get_user(params) do
|
with {:ok, %User{} = subscribed} <- get_user(params),
|
||||||
User.subscribe(subscriber, subscribed)
|
{:ok, subscriber} <- User.subscribe(subscriber, subscribed) do
|
||||||
|> IO.inspect
|
{:ok, subscriber, subscribed}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def unsubscribe(%User{} = unsubscriber, params) do
|
def unsubscribe(%User{} = unsubscriber, params) do
|
||||||
with {:ok, %User{} = unsubscribed} <- get_user(params) do
|
with {:ok, %User{} = unsubscribed} <- get_user(params),
|
||||||
User.unsubscribe(unsubscriber, unsubscribed)
|
{:ok, unsubscriber} <- User.unsubscribe(unsubscriber, unsubscribed) do
|
||||||
|
{:ok, unsubscriber, unsubscribed}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user