Remove credo and use mix format, and lint everything
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -15,12 +15,17 @@ defmodule Mix.Tasks.CreateBot do
|
||||
Mix.Task.run("app.start")
|
||||
|
||||
with {:ok, %User{} = user} <- Actors.find_by_email(email),
|
||||
actor <- Actors.register_bot_account(%{name: name, summary: summary}),
|
||||
{:ok, %Bot{} = bot} <- Actors.create_bot(%{"type" => type, "source" => url, "actor_id" => actor.id, "user_id" => user.id}) do
|
||||
actor <- Actors.register_bot_account(%{name: name, summary: summary}),
|
||||
{:ok, %Bot{} = bot} <-
|
||||
Actors.create_bot(%{
|
||||
"type" => type,
|
||||
"source" => url,
|
||||
"actor_id" => actor.id,
|
||||
"user_id" => user.id
|
||||
}) do
|
||||
bot
|
||||
|
||||
else
|
||||
e -> Logger.error(inspect e)
|
||||
e -> Logger.error(inspect(e))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user