return unquoted empty array from /api/qvitter/mutes.json
This commit is contained in:
parent
6316003946
commit
1299bccc7d
@ -269,7 +269,7 @@ def user_fetcher(username) do
|
|||||||
get("/friendships/no_retweets/ids", TwitterAPI.Controller, :empty_array)
|
get("/friendships/no_retweets/ids", TwitterAPI.Controller, :empty_array)
|
||||||
|
|
||||||
get("/mutes/users/ids", TwitterAPI.Controller, :empty_array)
|
get("/mutes/users/ids", TwitterAPI.Controller, :empty_array)
|
||||||
get("/qvitter/mutes", TwitterAPI.Controller, :empty_array)
|
get("/qvitter/mutes", TwitterAPI.Controller, :raw_empty_array)
|
||||||
|
|
||||||
get("/externalprofile/show", TwitterAPI.Controller, :external_profile)
|
get("/externalprofile/show", TwitterAPI.Controller, :external_profile)
|
||||||
end
|
end
|
||||||
|
@ -404,6 +404,10 @@ def empty_array(conn, _params) do
|
|||||||
json(conn, Jason.encode!([]))
|
json(conn, Jason.encode!([]))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def raw_empty_array(conn, _params) do
|
||||||
|
json(conn, [])
|
||||||
|
end
|
||||||
|
|
||||||
def update_profile(%{assigns: %{user: user}} = conn, params) do
|
def update_profile(%{assigns: %{user: user}} = conn, params) do
|
||||||
params =
|
params =
|
||||||
if bio = params["description"] do
|
if bio = params["description"] do
|
||||||
|
@ -506,7 +506,7 @@ test "unimplemented mutes with credentials", %{conn: conn, user: current_user} d
|
|||||||
|> get("/api/qvitter/mutes.json")
|
|> get("/api/qvitter/mutes.json")
|
||||||
current_user = Repo.get(User, current_user.id)
|
current_user = Repo.get(User, current_user.id)
|
||||||
|
|
||||||
assert "[]" = json_response(conn, 200)
|
assert [] = json_response(conn, 200)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user