commit: 5fcab23aa3a6187d2e8746ff92330ab2aed807f6
parent 7f0787163999fc0ac0c6fcfd0c13f80c5a55266d
Author: Mark Felder <feld@feld.me>
Date: Thu, 28 Jan 2021 14:57:24 -0600
Improve error message for ConfigDB
Diffstat:
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/pleroma/web/admin_api/controllers/admin_api_controller.ex b/lib/pleroma/web/admin_api/controllers/admin_api_controller.ex
@@ -404,7 +404,7 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIController do
if Config.get(:configurable_from_database) do
:ok
else
- {:error, "To use this endpoint you need to enable configuration from database."}
+ {:error, "You must enable configurable_from_database in your config file."}
end
end
diff --git a/lib/pleroma/web/admin_api/controllers/config_controller.ex b/lib/pleroma/web/admin_api/controllers/config_controller.ex
@@ -122,7 +122,7 @@ defmodule Pleroma.Web.AdminAPI.ConfigController do
if Config.get(:configurable_from_database) do
:ok
else
- {:error, "To use this endpoint you need to enable configuration from database."}
+ {:error, "You must enable configurable_from_database in your config file."}
end
end
diff --git a/test/pleroma/web/admin_api/controllers/config_controller_test.exs b/test/pleroma/web/admin_api/controllers/config_controller_test.exs
@@ -31,7 +31,7 @@ defmodule Pleroma.Web.AdminAPI.ConfigControllerTest do
assert json_response_and_validate_schema(conn, 400) ==
%{
- "error" => "To use this endpoint you need to enable configuration from database."
+ "error" => "You must enable configurable_from_database in your config file."
}
end
@@ -170,7 +170,7 @@ defmodule Pleroma.Web.AdminAPI.ConfigControllerTest do
|> post("/api/pleroma/admin/config", %{"configs" => []})
assert json_response_and_validate_schema(conn, 400) ==
- %{"error" => "To use this endpoint you need to enable configuration from database."}
+ %{"error" => "You must enable configurable_from_database in your config file."}
end
describe "POST /api/pleroma/admin/config" do