diff options
author | hakabahitoyo <hakabahitoyo@example.com> | 2018-07-14 00:44:18 +0900 |
---|---|---|
committer | hakabahitoyo <hakabahitoyo@example.com> | 2018-07-14 00:44:18 +0900 |
commit | 4a21c1b343c3f62d78da1651ed490daf4dde5d97 (patch) | |
tree | f94c9b4f4306b6b161750086907f133228d1c7a5 | |
parent | f944f8157ac078aef5edda64059a5d6d3837bf53 (diff) | |
download | pleroma-4a21c1b343c3f62d78da1651ed490daf4dde5d97.tar.gz |
mock /api/v1/suggestions
-rw-r--r-- | lib/pleroma/web/mastodon_api/mastodon_api_controller.ex | 8 |
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 |