Skip to content

Commit

Permalink
Reset la session for real
Browse files Browse the repository at this point in the history
  • Loading branch information
jbfeldis committed Jun 13, 2024
1 parent d044773 commit b96eb88
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions app/controllers/claims_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def send_qf
result = StoreQuotientFamilial.call(user: Current.user, identity: Current.pivot_identity, quotient_familial: Current.quotient_familial, recipient: hubee_recipient)

if result.success?
reset_session
Rails.logger.debug "Noïce"
@folder = result.folder
else
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class ClearUserSession < BaseInteractor
class ClearCurrentAttributes < BaseInteractor
def call
Current.user = nil
Current.pivot_identity = nil
Expand Down
2 changes: 1 addition & 1 deletion app/organizers/store_quotient_familial.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
class StoreQuotientFamilial < BaseOrganizer
organize UploadQuotientFamilialToHubEE, CreateShipment, ClearUserSession
organize UploadQuotientFamilialToHubEE, CreateShipment, ClearCurrentAttributes
end
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require "rails_helper"

RSpec.describe ClearUserSession, type: :interactor do
RSpec.describe ClearCurrentAttributes, type: :interactor do
subject(:interactor) { described_class.call }

before do
Expand Down
2 changes: 1 addition & 1 deletion spec/organizers/store_quotient_familial_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[
UploadQuotientFamilialToHubEE,
CreateShipment,
ClearUserSession,
ClearCurrentAttributes,
]
end

Expand Down

0 comments on commit b96eb88

Please sign in to comment.