From 4a21c1b343c3f62d78da1651ed490daf4dde5d97 Mon Sep 17 00:00:00 2001 From: hakabahitoyo Date: Sat, 14 Jul 2018 00:44:18 +0900 Subject: [PATCH] mock /api/v1/suggestions --- lib/pleroma/web/mastodon_api/mastodon_api_controller.ex | 8 ++++++-- 1 file 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 -- 2.45.2