Skip to content
Snippets Groups Projects
Unverified Commit 99f94135 authored by Thomas Citharel's avatar Thomas Citharel
Browse files

Credo checks


Signed-off-by: default avatarThomas Citharel <tcit@tcit.fr>
parent 63b63d9e
No related branches found
No related tags found
No related merge requests found
......@@ -14,7 +14,7 @@ defmodule EventosWeb.BotController do
def create(conn, %{"bot" => bot_params}) do
with user <- Guardian.Plug.current_resource,
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),
{:ok, %Bot{} = bot} <- Actors.create_bot(bot_params) do
conn
......
......@@ -306,7 +306,7 @@ defmodule Eventos.Service.ActivityPub do
|> Enum.chunk_every(limit)
|> Enum.at(page - 1)
|> 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
end)
{activities, length(ical_events)}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment