current shop changes

This commit is contained in:
Nweni
2019-11-28 18:33:56 +06:30
parent d41d957688
commit 3a85f1e319
9 changed files with 59 additions and 46 deletions

View File

@@ -2,9 +2,17 @@ class Api::ApiController < ActionController::API
include TokenVerification
include ActionController::MimeResponds
# before_action :lookup_domain
before_action :core_allow
helper_method :current_token, :current_login_employee, :get_cashier
def core_allow
headers['Access-Control-Allow-Origin'] = '*'
headers['Access-Control-Allow-Methods'] = 'POST, PUT, DELETE, GET, OPTIONS'
headers['Access-Control-Request-Method'] = '*'
headers['Access-Control-Allow-Headers'] = 'Origin, X-Requested-With, Content-Type, Accept, Authorization'
end
private
#this is base api base controller to need to inherit.
#all token authentication must be done here