quarantine instances info
[akkoma] / lib / pleroma / web / mastodon_api / views / instance_view.ex
index db40ea3fab8f143cdc1092ffe587925950cc2290..a341ca6f4a4f11eb1a860ff685f22e311664903e 100644 (file)
@@ -98,7 +98,15 @@ defmodule Pleroma.Web.MastodonAPI.InstanceView do
       |> Map.merge(%{
         quarantined_instances:
           quarantined
-          |> Enum.map(fn {instance, reason} -> %{"instance" => instance, "reason" => reason} end)
+          |> Enum.map(fn {instance, _reason} -> instance end)
+      })
+      |> Map.merge(%{
+        quarantined_instances_info: %{
+          "quarantined_instances" =>
+            quarantined
+            |> Enum.map(fn {instance, reason} -> {instance, %{"reason" => reason}} end)
+            |> Enum.into(%{})
+        }
       })
     else
       %{}