update action cable for cloud

This commit is contained in:
Aung Myo
2018-04-23 14:17:56 +06:30
parent 8806027793
commit cbb7a14621
2 changed files with 4 additions and 4 deletions

View File

@@ -184,11 +184,11 @@ puts items_arr.to_json
@status, @sale = Sale.request_bill(@order,current_user,current_login_employee) @status, @sale = Sale.request_bill(@order,current_user,current_login_employee)
# for second display # for second display
if ENV["SERVER_MODE"] != 'cloud' # if ENV["SERVER_MODE"] != 'cloud'
ActionCable.server.broadcast "second_display_channel",data: @sale,status:"sale" ActionCable.server.broadcast "second_display_channel",data: @sale,status:"sale"
end # end
result = {:status=> @status, :data => @sale } result = {:status=> @status, :data => @sale }
render :json => result.to_json render :json => result.to_json
end end