diff options
author | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2020-02-05 20:36:21 +0300 |
---|---|---|
committer | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2020-02-05 20:36:21 +0300 |
commit | 5db6ac8ee405d89943a3669da4ea154ce004860f (patch) | |
tree | a991a6549ab24dd8de48f66792511bb2be46025c /lib | |
parent | 49e80a15377fe460d7ac644601609700fffea632 (diff) | |
download | pleroma-5db6ac8ee405d89943a3669da4ea154ce004860f.tar.gz |
removing migrate_from_db endpoint from admin api
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/admin_api/admin_api_controller.ex | 15 | ||||
-rw-r--r-- | lib/pleroma/web/router.ex | 1 |
2 files changed, 1 insertions, 15 deletions
diff --git a/lib/pleroma/web/admin_api/admin_api_controller.ex b/lib/pleroma/web/admin_api/admin_api_controller.ex index 6f0449418..293f1befc 100644 --- a/lib/pleroma/web/admin_api/admin_api_controller.ex +++ b/lib/pleroma/web/admin_api/admin_api_controller.ex @@ -97,7 +97,7 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIController do plug( OAuthScopesPlug, %{scopes: ["read"], admin: true} - when action in [:config_show, :migrate_from_db, :list_log] + when action in [:config_show, :list_log] ) plug( @@ -793,19 +793,6 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIController do |> Plug.Conn.send_resp(200, @descriptions_json) end - def migrate_from_db(conn, _params) do - with :ok <- configurable_from_database(conn) do - Mix.Tasks.Pleroma.Config.run([ - "migrate_from_db", - "--env", - to_string(Pleroma.Config.get(:env)), - "-d" - ]) - - json(conn, %{}) - end - end - def config_show(conn, %{"only_db" => true}) do with :ok <- configurable_from_database(conn) do configs = Pleroma.Repo.all(ConfigDB) diff --git a/lib/pleroma/web/router.ex b/lib/pleroma/web/router.ex index 078bf138c..e86bc3cc3 100644 --- a/lib/pleroma/web/router.ex +++ b/lib/pleroma/web/router.ex @@ -196,7 +196,6 @@ defmodule Pleroma.Web.Router do get("/config", AdminAPIController, :config_show) post("/config", AdminAPIController, :config_update) get("/config/descriptions", AdminAPIController, :config_descriptions) - get("/config/migrate_from_db", AdminAPIController, :migrate_from_db) get("/restart", AdminAPIController, :restart) get("/moderation_log", AdminAPIController, :list_log) |