diff --git a/decidim-admin/app/commands/decidim/admin/update_share_token.rb b/decidim-admin/app/commands/decidim/admin/update_share_token.rb index 8bd67345ea6e..6334c5da65c3 100644 --- a/decidim-admin/app/commands/decidim/admin/update_share_token.rb +++ b/decidim-admin/app/commands/decidim/admin/update_share_token.rb @@ -2,10 +2,10 @@ module Decidim module Admin - # A command with all the business logic to create a taxonomy. + # A command with all the business logic to update a taxonomy. # This command is called from the controller. class UpdateShareToken < Decidim::Commands::UpdateResource - fetch_form_attributes :token, :expires_at, :organization, :user, :token_for + fetch_form_attributes :token, :expires_at end end end diff --git a/decidim-admin/app/controllers/decidim/admin/share_tokens_controller.rb b/decidim-admin/app/controllers/decidim/admin/share_tokens_controller.rb index ea51f388eeb4..e99fc1fbbc29 100644 --- a/decidim-admin/app/controllers/decidim/admin/share_tokens_controller.rb +++ b/decidim-admin/app/controllers/decidim/admin/share_tokens_controller.rb @@ -35,7 +35,7 @@ def edit def update @form = form(ShareTokenForm).from_params(params, component:) - UpdateShareToken.call(@form) do + UpdateShareToken.call(@form, share_token) do on(:ok) do flash[:notice] = I18n.t("share_tokens.update.success", scope: "decidim.admin") redirect_to share_tokens_path(component) diff --git a/decidim-admin/app/views/decidim/admin/share_tokens/edit.html.erb b/decidim-admin/app/views/decidim/admin/share_tokens/edit.html.erb index beffe3ab1fb8..82c6a7489862 100644 --- a/decidim-admin/app/views/decidim/admin/share_tokens/edit.html.erb +++ b/decidim-admin/app/views/decidim/admin/share_tokens/edit.html.erb @@ -5,7 +5,7 @@