Return the file content for `GET /api/pleroma/admin/instance_document/:document_name`
[akkoma] / lib / pleroma / web / api_spec / operations / admin / instance_document_operation.ex
index e0eb993fb287370a6b0cc4707e452433e591840c..a120ff4e84b3ec775e5f6467985a764b9ca131f1 100644 (file)
@@ -26,7 +26,7 @@ defmodule Pleroma.Web.ApiSpec.Admin.InstanceDocumentOperation do
         | Helpers.admin_api_params()
       ],
       responses: %{
-        200 => Operation.response("InstanceDocument", "application/json", instance_document()),
+        200 => document_content(),
         400 => Operation.response("Bad Request", "application/json", ApiError),
         403 => Operation.response("Forbidden", "application/json", ApiError),
         404 => Operation.response("Not Found", "application/json", ApiError)
@@ -105,4 +105,11 @@ defmodule Pleroma.Web.ApiSpec.Admin.InstanceDocumentOperation do
       }
     }
   end
+
+  defp document_content do
+    Operation.response("InstanceDocumentContent", "text/html", %Schema{
+      type: :string,
+      example: "<h1>Instance panel</h1>"
+    })
+  end
 end