Run mix format on Elixir 12

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-06-07 16:39:44 +02:00
parent 95913ba28b
commit a336e76aae
20 changed files with 52 additions and 180 deletions

View File

@@ -170,9 +170,7 @@ defmodule Mix.Tasks.Mobilizon.Instance do
"""
To get started:
1. Check the contents of the generated files.
2. Run `sudo -u postgres psql -f #{escape_sh_path(psql_path)} && rm #{
escape_sh_path(psql_path)
}`.
2. Run `sudo -u postgres psql -f #{escape_sh_path(psql_path)} && rm #{escape_sh_path(psql_path)}`.
"""
)
else

View File

@@ -66,9 +66,7 @@ defmodule Mix.Tasks.Mobilizon.Users.Clean do
Enum.each(deleted_users, fn deleted_user ->
shell_info(
"ID: #{deleted_user.id}, Email: #{deleted_user.email}, Profile: @#{
hd(deleted_user.actors).preferred_username
}"
"ID: #{deleted_user.id}, Email: #{deleted_user.email}, Profile: @#{hd(deleted_user.actors).preferred_username}"
)
end)
end

View File

@@ -58,11 +58,9 @@ defmodule Mix.Tasks.Mobilizon.Users.Modify do
An user has been modified with the following information:
- email: #{user.email}
- Role: #{user.role}
- account status: #{
if user.confirmed_at,
do: "activated on #{DateTime.to_string(user.confirmed_at)} (UTC)",
else: "disabled"
}
- account status: #{if user.confirmed_at,
do: "activated on #{DateTime.to_string(user.confirmed_at)} (UTC)",
else: "disabled"}
""")
else
{:makes_changes, false} ->

View File

@@ -19,11 +19,9 @@ defmodule Mix.Tasks.Mobilizon.Users.Show do
actors <- Users.get_actors_for_user(user) do
shell_info("""
Informations for the user #{user.email}:
- account status: #{
if user.confirmed_at,
do: "Activated on #{DateTime.to_string(user.confirmed_at)} (UTC)",
else: "disabled"
}
- account status: #{if user.confirmed_at,
do: "Activated on #{DateTime.to_string(user.confirmed_at)} (UTC)",
else: "disabled"}
- Role: #{user.role}
#{display_actors(actors)}
""")