From: Haelwenn Date: Wed, 21 Oct 2020 19:40:37 +0000 (+0000) Subject: Apply 1 suggestion(s) to 1 file(s) X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=2ca98f2d94e2976ae35998aecff27809d4b066cf;p=akkoma Apply 1 suggestion(s) to 1 file(s) --- diff --git a/lib/pleroma/web/pleroma_api/controllers/instances_controller.ex b/lib/pleroma/web/pleroma_api/controllers/instances_controller.ex index c577f1d1e..9e97480df 100644 --- a/lib/pleroma/web/pleroma_api/controllers/instances_controller.ex +++ b/lib/pleroma/web/pleroma_api/controllers/instances_controller.ex @@ -14,7 +14,7 @@ defmodule Pleroma.Web.PleromaAPI.InstancesController do def show(conn, _params) do unreachable = Instances.get_consistently_unreachable() - |> Enum.reduce(%{}, fn {host, date}, acc -> Map.put(acc, host, to_string(date)) end) + |> Map.new(fn {host, date} -> {host, to_string(date)} end) json(conn, %{"unreachable" => unreachable}) end