From b0377afb8f3411cd54f8a4be760cc8baf1b9c06d Mon Sep 17 00:00:00 2001 From: Yan Date: Thu, 3 May 2018 17:53:34 +0630 Subject: [PATCH] no change --- app/controllers/base_origami_controller.rb | 2 +- app/controllers/origami/other_charges_controller.rb | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/app/controllers/base_origami_controller.rb b/app/controllers/base_origami_controller.rb index 66cc2880..0c01a735 100755 --- a/app/controllers/base_origami_controller.rb +++ b/app/controllers/base_origami_controller.rb @@ -15,7 +15,7 @@ class BaseOrigamiController < ActionController::Base redirect_to origami_dashboard_path end - def check_user + def check_user if check_mobile if current_user.nil? return render status: 401, json: { diff --git a/app/controllers/origami/other_charges_controller.rb b/app/controllers/origami/other_charges_controller.rb index 28ab2c06..4b94990b 100755 --- a/app/controllers/origami/other_charges_controller.rb +++ b/app/controllers/origami/other_charges_controller.rb @@ -15,12 +15,11 @@ class Origami::OtherChargesController < BaseOrigamiController @table = DiningFacility.find(@sale_data.bookings[0].dining_facility_id) else @table = nil - end - + end end end - def create + def create sale_id = params[:sale_id] other_charges_items = JSON.parse(params[:other_charges_items]) sub_total = params[:sub_total] @@ -79,8 +78,6 @@ class Origami::OtherChargesController < BaseOrigamiController if !table.nil? dining = {:table_id => table_id, :table_type => table.type } render :json => dining.to_json - end - - end - + end + end end \ No newline at end of file