forked from External/greenlight
fix logout route to not conflict with BBB
This commit is contained in:
parent
086a39ca3d
commit
ce6ec0acfb
|
@ -1,16 +1,16 @@
|
|||
class SessionsController < ApplicationController
|
||||
|
||||
# GET /login
|
||||
# GET /users/login
|
||||
def new
|
||||
end
|
||||
|
||||
# GET /logout
|
||||
# GET /users/logout
|
||||
def destroy
|
||||
logout
|
||||
redirect_to root_path
|
||||
end
|
||||
|
||||
# POST /login
|
||||
# POST /users/login
|
||||
def create
|
||||
user = User.find_by(email: session_params[:email])
|
||||
if user && user.authenticate(session_params[:password])
|
||||
|
|
|
@ -22,17 +22,21 @@ Rails.application.routes.draw do
|
|||
end
|
||||
end
|
||||
|
||||
# User resources.
|
||||
# Signup routes.
|
||||
get '/signup', to: 'users#new', as: :signup
|
||||
post '/signup', to: 'users#create', as: :create_user
|
||||
get '/users/:user_uid/edit', to: 'users#edit', as: :edit_user
|
||||
patch '/users/:user_uid/edit', to: 'users#update', as: :update_user
|
||||
|
||||
# User resources.
|
||||
scope '/users' do
|
||||
get '/:user_uid/edit', to: 'users#edit', as: :edit_user
|
||||
patch '/:user_uid/edit', to: 'users#update', as: :update_user
|
||||
|
||||
# Handles login of greenlight provider accounts.
|
||||
post '/login', to: 'sessions#create', as: :create_session
|
||||
|
||||
# Log the user out of the session.
|
||||
get '/logout', to: 'sessions#destroy'
|
||||
end
|
||||
|
||||
# Handles launches from a trusted launcher.
|
||||
post '/launch', to: 'sessions#launch'
|
||||
|
|
Loading…
Reference in New Issue