aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authoreal <eal@waifu.club>2017-10-29 00:30:10 +0300
committereal <eal@waifu.club>2017-10-29 00:30:10 +0300
commit2ffc6da20799ac8e7882f5e72d3f37dadc1f2428 (patch)
treec78942f0c838cd3c6f0af9aff184a83210ff2439 /lib
parentc56d28f96c343d445ec8d06baf351423691036f3 (diff)
downloadpleroma-2ffc6da20799ac8e7882f5e72d3f37dadc1f2428.tar.gz
Clean style.
Use 'follow' instead of 'follows' and correct indentation.
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/mastodon_api/mastodon_api_controller.ex6
-rw-r--r--lib/pleroma/web/router.ex2
2 files changed, 4 insertions, 4 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 ->
diff --git a/lib/pleroma/web/router.ex b/lib/pleroma/web/router.ex
index 557d094b4..45c47eefb 100644
--- a/lib/pleroma/web/router.ex
+++ b/lib/pleroma/web/router.ex
@@ -62,7 +62,7 @@ defmodule Pleroma.Web.Router do
post "/accounts/:id/mute", MastodonAPIController, :relationship_noop
post "/accounts/:id/unmute", MastodonAPIController, :relationship_noop
- post "/follows", MastodonAPIController, :follows
+ post "/follows", MastodonAPIController, :follow
get "/blocks", MastodonAPIController, :empty_array
get "/domain_blocks", MastodonAPIController, :empty_array