Credo checks

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2018-06-06 17:52:24 +02:00
parent 63b63d9ee2
commit 99f9413519
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773
2 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ defmodule EventosWeb.BotController do
def create(conn, %{"bot" => bot_params}) do def create(conn, %{"bot" => bot_params}) do
with user <- Guardian.Plug.current_resource, with user <- Guardian.Plug.current_resource,
bot_params <- Map.put(bot_params, "user_id", user.id), bot_params <- Map.put(bot_params, "user_id", user.id),
{:ok, actor } <- Actors.register_bot_account(%{name: bot_params["name"], summary: bot_params["summary"]}), {:ok, actor} <- Actors.register_bot_account(%{name: bot_params["name"], summary: bot_params["summary"]}),
bot_params <- Map.put(bot_params, "actor_id", actor.id), bot_params <- Map.put(bot_params, "actor_id", actor.id),
{:ok, %Bot{} = bot} <- Actors.create_bot(bot_params) do {:ok, %Bot{} = bot} <- Actors.create_bot(bot_params) do
conn conn

View File

@ -306,7 +306,7 @@ defmodule Eventos.Service.ActivityPub do
|> Enum.chunk_every(limit) |> Enum.chunk_every(limit)
|> Enum.at(page - 1) |> Enum.at(page - 1)
|> Enum.map(fn event -> |> Enum.map(fn event ->
{:ok, activity } = ical_event_to_activity(event, actor, bot.source) {:ok, activity} = ical_event_to_activity(event, actor, bot.source)
activity activity
end) end)
{activities, length(ical_events)} {activities, length(ical_events)}