aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhakabahitoyo <hakabahitoyo@example.com>2018-07-14 00:44:18 +0900
committerhakabahitoyo <hakabahitoyo@example.com>2018-07-14 00:44:18 +0900
commit4a21c1b343c3f62d78da1651ed490daf4dde5d97 (patch)
treef94c9b4f4306b6b161750086907f133228d1c7a5
parentf944f8157ac078aef5edda64059a5d6d3837bf53 (diff)
downloadpleroma-4a21c1b343c3f62d78da1651ed490daf4dde5d97.tar.gz
mock /api/v1/suggestions
-rw-r--r--lib/pleroma/web/mastodon_api/mastodon_api_controller.ex8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
index 0184d52c8..0f50eba84 100644
--- a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
+++ b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
@@ -1071,8 +1071,12 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
|> json("Something went wrong")
end
- def suggestions(conn, _) do
+ def suggestions(%{assigns: %{user: user}} = conn, _) do
+ res = %{
+ host: (String.replace Web.base_url(), "https://", ""),
+ user: user.nickname
+ }
conn
- |> json("SUGGESTIONS!")
+ |> json(res)
end
end