aboutsummaryrefslogtreecommitdiff
path: root/lib/mix
diff options
context:
space:
mode:
authorHaelwenn <contact+git.pleroma.social@hacktivis.me>2021-10-06 06:12:08 +0000
committerHaelwenn <contact+git.pleroma.social@hacktivis.me>2021-10-06 06:12:08 +0000
commit390ceb9f94ca27efbf8dbb094225d441fe5e188f (patch)
tree412d2f7acd3789b72d388cbfefca6a96041c139b /lib/mix
parentbdaa7e53940daa43b83e3baab836b701482e6d8f (diff)
parenta17910a6c6dca88d98218bf9782b05b70b69446f (diff)
downloadpleroma-390ceb9f94ca27efbf8dbb094225d441fe5e188f.tar.gz
Merge branch 'ci/bump-elixir-lint' into 'develop'
CI: Bump lint stage to elixir-1.12 See merge request pleroma/pleroma!3488
Diffstat (limited to 'lib/mix')
-rw-r--r--lib/mix/tasks/pleroma/config.ex4
-rw-r--r--lib/mix/tasks/pleroma/user.ex24
2 files changed, 7 insertions, 21 deletions
diff --git a/lib/mix/tasks/pleroma/config.ex b/lib/mix/tasks/pleroma/config.ex
index 22502a522..05ff8076f 100644
--- a/lib/mix/tasks/pleroma/config.ex
+++ b/lib/mix/tasks/pleroma/config.ex
@@ -286,9 +286,7 @@ defmodule Mix.Tasks.Pleroma.Config do
file = File.open!(tmp_config_path)
shell_info(
- "Saving database configuration settings to #{tmp_config_path}. Copy it to the #{
- Path.dirname(config_path)
- } manually."
+ "Saving database configuration settings to #{tmp_config_path}. Copy it to the #{Path.dirname(config_path)} manually."
)
write_config(file, tmp_config_path, opts)
diff --git a/lib/mix/tasks/pleroma/user.ex b/lib/mix/tasks/pleroma/user.ex
index 53d5fc6d9..e848222b8 100644
--- a/lib/mix/tasks/pleroma/user.ex
+++ b/lib/mix/tasks/pleroma/user.ex
@@ -51,9 +51,7 @@ defmodule Mix.Tasks.Pleroma.User do
A user will be created with the following information:
- nickname: #{nickname}
- email: #{email}
- - password: #{
- if(generated_password?, do: "[generated; a reset link will be created]", else: password)
- }
+ - password: #{if(generated_password?, do: "[generated; a reset link will be created]", else: password)}
- name: #{name}
- bio: #{bio}
- moderator: #{if(moderator?, do: "true", else: "false")}
@@ -114,15 +112,9 @@ defmodule Mix.Tasks.Pleroma.User do
{:ok, token} <- Pleroma.PasswordResetToken.create_token(user) do
shell_info("Generated password reset token for #{user.nickname}")
- IO.puts(
- "URL: #{
- Pleroma.Web.Router.Helpers.reset_password_url(
- Pleroma.Web.Endpoint,
- :reset,
- token.token
- )
- }"
- )
+ IO.puts("URL: #{Pleroma.Web.Router.Helpers.reset_password_url(Pleroma.Web.Endpoint,
+ :reset,
+ token.token)}")
else
_ ->
shell_error("No local user #{nickname}")
@@ -321,9 +313,7 @@ defmodule Mix.Tasks.Pleroma.User do
end
shell_info(
- "ID: #{invite.id} | Token: #{invite.token} | Token type: #{invite.invite_type} | Used: #{
- invite.used
- }#{expire_info}#{using_info}"
+ "ID: #{invite.id} | Token: #{invite.token} | Token type: #{invite.invite_type} | Used: #{invite.used}#{expire_info}#{using_info}"
)
end)
end
@@ -424,9 +414,7 @@ defmodule Mix.Tasks.Pleroma.User do
users
|> Enum.each(fn user ->
shell_info(
- "#{user.nickname} moderator: #{user.is_moderator}, admin: #{user.is_admin}, locked: #{
- user.is_locked
- }, is_active: #{user.is_active}"
+ "#{user.nickname} moderator: #{user.is_moderator}, admin: #{user.is_admin}, locked: #{user.is_locked}, is_active: #{user.is_active}"
)
end)
end)