Commit 2ffc6da2 authored by eal's avatar eal
Browse files

Clean style.

Use 'follow' instead of 'follows' and correct indentation.
parent c56d28f9
......@@ -282,10 +282,10 @@ def follow(%{assigns: %{user: follower}} = conn, %{"id" => id}) 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 ->
......
......@@ -62,7 +62,7 @@ def user_fetcher(username) 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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment