From 41a17f47ae275f8e84de03115e142cc23526bacc Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Fri, 3 Mar 2023 20:34:06 -0600 Subject: AƱade refactorizaciones MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/authentications_controller/create_logic.rb | 23 ---------------------- 1 file changed, 23 deletions(-) delete mode 100644 app/controllers/api/authentications_controller/create_logic.rb (limited to 'app/controllers/api/authentications_controller/create_logic.rb') 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 -- cgit v1.2.3