Skip to content

Commit

Permalink
Add method to login audit event
Browse files Browse the repository at this point in the history
  • Loading branch information
Taucher2003 committed Jan 10, 2024
1 parent 6d4848a commit c54051c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/services/user_login_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def execute
:user_logged_in,
author_id: user.id,
entity: user,
details: args.slice(:username, :email),
details: args.slice(:username, :email).merge({ method: :username_and_password }),
target: user
)

Expand Down
4 changes: 2 additions & 2 deletions spec/requests/graphql/mutation/users/login_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
:user_logged_in,
author_id: user.id,
entity_id: user.id,
details: { email: user.email }
details: { email: user.email, method: 'username_and_password' }
)
end
end
Expand All @@ -78,7 +78,7 @@
:user_logged_in,
author_id: user.id,
entity_id: user.id,
details: { username: user.username }
details: { username: user.username, method: 'username_and_password' }
)
end
end
Expand Down

0 comments on commit c54051c

Please sign in to comment.