aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/api_keys_controller.rb
diff options
context:
space:
mode:
authorLuc Donnet2017-09-11 17:27:10 +0200
committerLuc Donnet2017-09-11 17:27:10 +0200
commit5ee3a180de710d23ceb7660b1bcc454701b42d87 (patch)
treec5a6fa4d304306bb53dfcea93037f3ac10b46624 /app/controllers/api_keys_controller.rb
parent1b2976d7a63cc140304bd94b88b5ddc93e0aceb0 (diff)
downloadchouette-core-5ee3a180de710d23ceb7660b1bcc454701b42d87.tar.bz2
Fix views and access for api keys generation Refs #4276 @8
Diffstat (limited to 'app/controllers/api_keys_controller.rb')
-rw-r--r--app/controllers/api_keys_controller.rb22
1 files changed, 15 insertions, 7 deletions
diff --git a/app/controllers/api_keys_controller.rb b/app/controllers/api_keys_controller.rb
index 7059cf52e..03e5ef237 100644
--- a/app/controllers/api_keys_controller.rb
+++ b/app/controllers/api_keys_controller.rb
@@ -3,19 +3,27 @@ class ApiKeysController < BreadcrumbController
def create
@api_key = Api::V1::ApiKey.new(api_key_params.merge(organisation: current_organisation))
- create! { organisation_api_keys_path }
- end
-
- def index
- @api_keys = decorate_api_keys(current_organisation.api_keys.paginate(page: params[:page]))
+ create! do |format|
+ format.html {
+ redirect_to workbenches_path
+ }
+ end
end
def update
- update! { organisation_api_key_path(resource) }
+ update! do |format|
+ format.html {
+ redirect_to workbenches_path
+ }
+ end
end
def destroy
- destroy! { organisation_api_keys_path }
+ destroy! do |format|
+ format.html {
+ redirect_to workbenches_path
+ }
+ end
end
private