api keys: rework API key UI.

* Add an explanation of what an API key is and how to use it.
* Make it possible for the site owner to view all API keys.
* Remove the requirement to re-enter your password before you can view
  your API key (to be reworked).
* Move the API key controller from maintenance/user/api_keys_controller.rb
  to a top level controller.
This commit is contained in:
evazion
2021-02-14 02:50:03 -06:00
parent ae204df4ca
commit 37061f95a6
18 changed files with 224 additions and 167 deletions

View File

@@ -53,12 +53,11 @@ Rails.application.routes.draw do
resource :count_fixes, only: [:new, :create]
resource :email_notification, :only => [:show, :destroy]
resource :deletion, :only => [:show, :destroy]
resource :api_key, :only => [:show, :view, :update, :destroy] do
post :view
end
end
end
resources :api_keys, only: [:create, :index, :destroy]
resources :artists do
member do
put :revert
@@ -247,9 +246,7 @@ Rails.application.routes.draw do
post :send_confirmation
end
resource :password, only: [:edit, :update]
resource :api_key, :only => [:show, :view, :update, :destroy], :controller => "maintenance/user/api_keys" do
post :view
end
resources :api_keys, only: [:create, :index, :destroy]
collection do
get :custom_style