aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pleroma/web/mastodon_api/mastodon_api_controller.ex')
-rw-r--r--lib/pleroma/web/mastodon_api/mastodon_api_controller.ex6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
index 25c5418ab..971772810 100644
--- a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
+++ b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
@@ -282,10 +282,10 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
end
end
- def follows(%{assigns: %{user: follower}} = conn, %{"uri" => uri}) do
+ def follow(%{assigns: %{user: follower}} = conn, %{"uri" => uri}) do
with %User{} = followed <- Repo.get_by(User, nickname: uri),
- {:ok, follower} <- User.follow(follower, followed),
- {:ok, activity} <- ActivityPub.follow(follower, followed) do
+ {:ok, follower} <- User.follow(follower, followed),
+ {:ok, activity} <- ActivityPub.follow(follower, followed) do
render conn, AccountView, "account.json", %{user: followed}
else
{:error, message} = err ->