Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant into adminbsb_ui_changes
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
class Api::Restaurant::ItemSetsController < Api::ApiController
|
class Api::Restaurant::ItemSetsController < Api::ApiController
|
||||||
|
|
||||||
#Description
|
#Description
|
||||||
# Pull the default menu details and also other available (active) menus
|
# Pull the default menu details and also other available (active) menus
|
||||||
# Input Params - order_id
|
# Input Params - order_id
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
class Api::Restaurant::MenuCategoriesController < Api::ApiController
|
class Api::Restaurant::MenuCategoriesController < Api::ApiController
|
||||||
skip_before_action :authenticate
|
|
||||||
#Description
|
#Description
|
||||||
# Pull the default menu details and also other available (active) menus
|
# Pull the default menu details and also other available (active) menus
|
||||||
# Input Params - order_id
|
# Input Params - order_id
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
class Api::Restaurant::MenuController < Api::ApiController
|
class Api::Restaurant::MenuController < Api::ApiController
|
||||||
skip_before_action :authenticate
|
|
||||||
#Description
|
#Description
|
||||||
# Pull the default menu details and also other available (active) menus
|
# Pull the default menu details and also other available (active) menus
|
||||||
# Input Params - order_id
|
# Input Params - order_id
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
class Api::Restaurant::MenuItemAttributesController < Api::ApiController
|
class Api::Restaurant::MenuItemAttributesController < Api::ApiController
|
||||||
skip_before_action :authenticate
|
|
||||||
#Description
|
#Description
|
||||||
# Pull the default menu details and also other available (active) menus
|
# Pull the default menu details and also other available (active) menus
|
||||||
# Input Params - order_id
|
# Input Params - order_id
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
class Api::Restaurant::MenuItemInstancesController < Api::ApiController
|
class Api::Restaurant::MenuItemInstancesController < Api::ApiController
|
||||||
skip_before_action :authenticate
|
|
||||||
#Description
|
#Description
|
||||||
# Pull the default menu details and also other available (active) menus
|
# Pull the default menu details and also other available (active) menus
|
||||||
# Input Params - order_id
|
# Input Params - order_id
|
||||||
|
|||||||
@@ -16,16 +16,13 @@ class BaseOrigamiController < ActionController::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
def check_user
|
def check_user
|
||||||
token_status = false
|
if check_mobile
|
||||||
authenticate_with_http_token do |token, options|
|
if current_user.nil?
|
||||||
if token
|
return render status: 401, json: {
|
||||||
token_status = true
|
message: "User using other device!"
|
||||||
session[:webview] = true
|
}.to_json
|
||||||
session[:session_token] = token
|
|
||||||
end
|
end
|
||||||
end
|
else
|
||||||
|
|
||||||
if !token_status
|
|
||||||
if current_user.nil?
|
if current_user.nil?
|
||||||
redirect_to root_path
|
redirect_to root_path
|
||||||
end
|
end
|
||||||
@@ -49,9 +46,13 @@ class BaseOrigamiController < ActionController::Base
|
|||||||
#check webview
|
#check webview
|
||||||
def check_mobile
|
def check_mobile
|
||||||
status = false
|
status = false
|
||||||
puts "check mobile"
|
authenticate_with_http_token do |token, options|
|
||||||
puts session[:session_token]
|
if token
|
||||||
puts session[:webview]
|
session[:webview] = true
|
||||||
|
session[:session_token] = token
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if session[:webview] && request.user_agent =~ /android|blackberry|iphone|ipad|ipod|iemobile|mobile|webos/i
|
if session[:webview] && request.user_agent =~ /android|blackberry|iphone|ipad|ipod|iemobile|mobile|webos/i
|
||||||
status = true
|
status = true
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user