From dfc9c08796055c723fac11dd13eea90d340fa0ae Mon Sep 17 00:00:00 2001 From: Rin Toshaka Date: Wed, 5 Dec 2018 19:12:23 +0100 Subject: [PATCH] formating --- lib/mix/tasks/pleroma/relay.ex | 4 ++-- lib/mix/tasks/pleroma/user.ex | 21 ++++++++++++--------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/lib/mix/tasks/pleroma/relay.ex b/lib/mix/tasks/pleroma/relay.ex index aa0232a32..eaaded5cb 100644 --- a/lib/mix/tasks/pleroma/relay.ex +++ b/lib/mix/tasks/pleroma/relay.ex @@ -11,9 +11,9 @@ defmodule Mix.Tasks.Pleroma.Relay do ``mix pleroma.relay unfollow `` Example: ``mix pleroma.relay follow https://example.org/relay`` - + ## Unfollow a remote relay - + ``mix pleroma.relay unfollow `` Example: ``mix pleroma.relay unfollow https://example.org/relay`` diff --git a/lib/mix/tasks/pleroma/user.ex b/lib/mix/tasks/pleroma/user.ex index e2b9b6236..aa023aae8 100644 --- a/lib/mix/tasks/pleroma/user.ex +++ b/lib/mix/tasks/pleroma/user.ex @@ -237,9 +237,10 @@ defmodule Mix.Tasks.Pleroma.User do |> Map.put("is_moderator", value) info_cng = User.Info.admin_api_update(user.info, %{is_moderator: value}) - user_cng = - Ecto.Changeset.change(user) - |> put_embed(:info, info_cng) + + user_cng = + Ecto.Changeset.change(user) + |> put_embed(:info, info_cng) {:ok, user} = User.update_and_set_cache(user_cng) @@ -252,9 +253,10 @@ defmodule Mix.Tasks.Pleroma.User do |> Map.put("is_admin", value) info_cng = User.Info.admin_api_update(user.info, %{is_admin: value}) - user_cng = - Ecto.Changeset.change(user) - |> put_embed(:info, info_cng) + + user_cng = + Ecto.Changeset.change(user) + |> put_embed(:info, info_cng) {:ok, user} = User.update_and_set_cache(user_cng) @@ -267,9 +269,10 @@ defmodule Mix.Tasks.Pleroma.User do |> Map.put("locked", value) info_cng = User.Info.user_upgrade(user.info, %{locked: value}) - user_cng = - Ecto.Changeset.change(user) - |> put_embed(:info, info_cng) + + user_cng = + Ecto.Changeset.change(user) + |> put_embed(:info, info_cng) {:ok, user} = User.update_and_set_cache(user_cng)