check shop code for new order
This commit is contained in:
@@ -64,8 +64,14 @@ class Api::OrderReserve::OrderReservationController < Api::ApiController
|
||||
order_reservation_id, flag = OrderReservation.addOrderReservationInfo(order_reservation)
|
||||
|
||||
if flag #&& ENV["SERVER_MODE"] != 'cloud'
|
||||
shop = Shop.find_by_id(1)
|
||||
if !shop.shop_code.nil?
|
||||
shop_code = shop.shop_code
|
||||
else
|
||||
shop_code = ''
|
||||
end
|
||||
order_reservation = OrderReservation.get_pending_orders #find(order_reservation_id)
|
||||
ActionCable.server.broadcast "order_reservation_channel",data: order_reservation
|
||||
ActionCable.server.broadcast "order_reservation_channel",data: order_reservation,shop_code: shop_code
|
||||
end
|
||||
|
||||
if flag
|
||||
|
||||
Reference in New Issue
Block a user