work with current supplier backend

This commit is contained in:
2020-02-26 14:24:32 -05:00
parent 8740300b9a
commit 9e86b18c3e
4 changed files with 15 additions and 2 deletions
@@ -15,6 +15,15 @@ class ApplicationController < ActionController::Base
private
def authenticate_employee!
if auth_token = params[:auth_token].presence
raise CanCan::AccessDenied unless employee = Employee.find_by_authentication_token(auth_token)
sign_in employee
else
super
end
end
def allow_all_origins
headers['Access-Control-Allow-Origin'] = '*'
headers['Access-Control-Request-Method'] = '*'