update action cable and other bugs

This commit is contained in:
Aung Myo
2018-05-21 13:00:55 +06:30
parent e722ab88e9
commit 7e8b69aa7c
26 changed files with 749 additions and 537 deletions

View File

@@ -73,7 +73,12 @@ class Api::OrderReserve::OrderReservationController < Api::ApiController
result = { :status => true, :order_reservation_id => order_reservation_id, :message => "Order reservation is successfully created!" }
order_reservation = OrderReservation.get_pending_orders #find(order_reservation_id)
ActionCable.server.broadcast "order_reservation_channel",data: order_reservation,shop_code: shop_code
if ENV["SERVER_MODE"] == 'cloud'
from = request.subdomain + "." + request.domain
else
from = ""
end
ActionCable.server.broadcast "order_reservation_channel",data: order_reservation,shop_code: shop_code,from:from
else
result = { :status => true, :order_reservation_id => order_reservation_id, :message => "Order reservation is already existed!" }
end