Class: UffizziCore::Api::Cli::V1::SessionsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/uffizzi_core/api/cli/v1/sessions_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject

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?
    (session_form.user)

    return respond_with session_form.user
  end

  respond_with session_form
end

#destroyObject

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