From: hakabahitoyo Date: Fri, 13 Jul 2018 15:44:18 +0000 (+0900) Subject: mock /api/v1/suggestions X-Git-Url: http://git.squeep.com/?a=commitdiff_plain;h=4a21c1b343c3f62d78da1651ed490daf4dde5d97;p=akkoma mock /api/v1/suggestions --- 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