summaryrefslogtreecommitdiff
path: root/app/controllers/api/authentications_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/api/authentications_controller.rb')
-rw-r--r--app/controllers/api/authentications_controller.rb13
1 files changed, 5 insertions, 8 deletions
diff --git a/app/controllers/api/authentications_controller.rb b/app/controllers/api/authentications_controller.rb
index 0ab2cb7..3eb52c7 100644
--- a/app/controllers/api/authentications_controller.rb
+++ b/app/controllers/api/authentications_controller.rb
@@ -2,7 +2,7 @@
module Api
# The controller that handles authentications.
- class AuthenticationsController < ApplicationController
+ class AuthenticationsController < ApplicationController
def create
@token = logic(permitted_params).call
@@ -11,18 +11,15 @@ module Api
render json: { error_message: 'Credenciales incorrectas' }, status: :unauthorized
end
- def destroy; end
-
- def refresh; end
+ def destroy
+ current_user_account.session_key = nil
+ current_user_account.save
+ end
private
def permitted_params
params.require(:credentials).permit(:email, :password)
end
-
- def service
- @service = Services::AuthenticationService.new(permitted_params)
- end
end
end