Merge branch 'bugfix/web-notification-special-char' into 'develop'
[akkoma] / lib / pleroma / web / twitter_api / controllers / util_controller.ex
index d0bf3a315f2af2706dd8f34b321e2d62c9154be2..1122e6c5d26eef2e385ac184861cbd8bd81e673e 100644 (file)
@@ -365,10 +365,15 @@ defmodule Pleroma.Web.TwitterAPI.UtilController do
   end
 
   def healthcheck(conn, _params) do
-    info = Pleroma.Healthcheck.system_info()
+    info =
+      if Pleroma.Config.get([:instance, :healthcheck]) do
+        Pleroma.Healthcheck.system_info()
+      else
+        %{}
+      end
 
     conn =
-      if info.healthy do
+      if info[:healthy] do
         conn
       else
         Plug.Conn.put_status(conn, :service_unavailable)