TwitterAPI: Add unimplemented /friendships/no_retweets/ids.

This commit is contained in:
eal 2017-11-14 16:10:13 +02:00
parent 3533bf7eac
commit 22bbe27115
2 changed files with 5 additions and 0 deletions

View File

@ -190,6 +190,7 @@ defmodule Pleroma.Web.Router do
get "/statuses/followers", TwitterAPI.Controller, :followers
get "/statuses/friends", TwitterAPI.Controller, :friends
get "/friends/ids", TwitterAPI.Controller, :friends_ids
get "/friendships/no_retweets/ids", TwitterAPI.Controller, :empty_array
get "/externalprofile/show", TwitterAPI.Controller, :external_profile
end

View File

@ -270,12 +270,16 @@ defmodule Pleroma.Web.TwitterAPI.Controller do
ids = friends
|> Enum.map(fn x -> x.id end)
|> Poison.encode!
json(conn, ids)
else
_e -> bad_request_reply(conn, "Can't get friends")
end
end
def empty_array(conn, _params) do
json(conn, Poison.encode!([]))
end
def update_profile(%{assigns: %{user: user}} = conn, params) do
params = if bio = params["description"] do