diff options
author | HombreLaser <sebastian-440@live.com> | 2023-03-03 20:34:06 -0600 |
---|---|---|
committer | HombreLaser <sebastian-440@live.com> | 2023-03-03 20:34:06 -0600 |
commit | 41a17f47ae275f8e84de03115e142cc23526bacc (patch) | |
tree | 2fb62f78685698a7c55bf5cff8456d24b7a78361 /app/controllers/api/authentications_controller | |
parent | 094ee717f710ea4cf81d221c5bf9660b805da9b1 (diff) |
Añade refactorizaciones
Diffstat (limited to 'app/controllers/api/authentications_controller')
-rw-r--r-- | app/controllers/api/authentications_controller/create_logic.rb | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/app/controllers/api/authentications_controller/create_logic.rb b/app/controllers/api/authentications_controller/create_logic.rb deleted file mode 100644 index 782c760..0000000 --- a/app/controllers/api/authentications_controller/create_logic.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -module Api - class AuthenticationsController - # The logic for the create method of AuthenticationsController. - class CreateLogic - include TokenGenerationConcern - - def initialize(params) - @email = params[:email] - @password = params[:password] - @user_account = UserAccount.find_by(email: @email) - end - - def call - return unless @user_account&.authenticate(@password) - - generate_user_session_key(@user_account) - generate_token - end - end - end -end |