From 2664c3671f3e781400fb4701cd22f5fa6c44c3e3 Mon Sep 17 00:00:00 2001 From: simon lehericey Date: Wed, 13 Sep 2023 12:05:40 +0200 Subject: [PATCH] api_tokens_controller: only use turbo --- app/controllers/api_tokens_controller.rb | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/app/controllers/api_tokens_controller.rb b/app/controllers/api_tokens_controller.rb index a4c0348d2..bf51f65d6 100644 --- a/app/controllers/api_tokens_controller.rb +++ b/app/controllers/api_tokens_controller.rb @@ -5,10 +5,7 @@ class APITokensController < ApplicationController def create @api_token, @packed_token = APIToken.generate(current_administrateur) - respond_to do |format| - format.turbo_stream { render :index } - format.html { redirect_back(fallback_location: profil_path) } - end + render :index end def update @@ -20,19 +17,13 @@ class APITokensController < ApplicationController @api_token.update!(api_token_params) end - respond_to do |format| - format.turbo_stream { render :index } - format.html { redirect_back(fallback_location: profil_path) } - end + render :index end def destroy @api_token.destroy - respond_to do |format| - format.turbo_stream { render :index } - format.html { redirect_back(fallback_location: profil_path) } - end + render :index end private