Apply 1 suggestion(s) to 1 file(s)
authorHaelwenn <contact+git.pleroma.social@hacktivis.me>
Wed, 21 Oct 2020 19:40:37 +0000 (19:40 +0000)
committerHaelwenn <contact+git.pleroma.social@hacktivis.me>
Wed, 21 Oct 2020 19:40:37 +0000 (19:40 +0000)
lib/pleroma/web/pleroma_api/controllers/instances_controller.ex

index c577f1d1e9a3187284eb5ee50714811a56b83d8c..9e97480df2638245f3b33b8a7e9c1a073d479fa7 100644 (file)
@@ -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