Class: UffizziCore::Api::Cli::V1::SessionsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- UffizziCore::Api::Cli::V1::SessionsController
- Defined in:
- app/controllers/uffizzi_core/api/cli/v1/sessions_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
Create session.
-
#destroy ⇒ Object
Destroy session.
Instance Method Details
#create ⇒ Object
Create session
15 16 17 18 19 20 21 22 23 24 25 |
# File 'app/controllers/uffizzi_core/api/cli/v1/sessions_controller.rb', line 15 def create session_form = UffizziCore::Api::Cli::V1::SessionCreateForm.new(session_params) if session_form.valid? sign_in(session_form.user) return respond_with session_form.user end respond_with session_form end |
#destroy ⇒ Object
Destroy session
32 33 34 35 36 |
# File 'app/controllers/uffizzi_core/api/cli/v1/sessions_controller.rb', line 32 def destroy sign_out head :no_content end |