Infrastructure connection updates
This commit is contained in:
@@ -16,7 +16,7 @@ class ApplicationController < ActionController::Base
|
||||
private
|
||||
|
||||
def authenticate_employee!
|
||||
if auth_token = params[:auth_token].presence
|
||||
if auth_token = params[:auth_token].presence || request.headers['HTTP_AUTH_TOKEN'].presence
|
||||
raise CanCan::AccessDenied unless employee = Employee.find_by_authentication_token(auth_token)
|
||||
bypass_sign_in employee
|
||||
else
|
||||
@@ -125,9 +125,9 @@ private
|
||||
end
|
||||
alias json_notice js_notice
|
||||
|
||||
def show_404
|
||||
def show_404(options = {})
|
||||
respond_to do |format|
|
||||
format.html { render 'dashboard/404', layout: true, status: 404}
|
||||
format.html { render 'dashboard/404', options.reverse_merge(layout: true, status: 404)}
|
||||
format.json { render json: {ok: false}, status: 404 }
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
class SupplierController < Suppliers::ApplicationController
|
||||
def home
|
||||
if Rails.env.development?
|
||||
binding.pry
|
||||
redirecto_to "http://localhost:4202/supplier#{params[:other]}"
|
||||
redirect_to "http://localhost:4202/supplier/#{params[:other]}"
|
||||
else
|
||||
render html: File.read(Rails.root.join('public/supplier/index.html'))
|
||||
end
|
||||
|
||||
@@ -25,7 +25,6 @@ class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
|
||||
end
|
||||
|
||||
def failure(env = {})
|
||||
#binding.pry
|
||||
show_404
|
||||
show_404 alert: "There was a problem authorizing and identifier the user"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user