update booking controller in crm
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
class Api::BookingsController < Api::ApiController
|
||||
skip_before_action :authenticate
|
||||
|
||||
#Show customer by ID
|
||||
def index
|
||||
@customer = Customer.find_by(params[:id])
|
||||
@@ -10,19 +9,6 @@ class Api::BookingsController < Api::ApiController
|
||||
@booking = Booking.find(params[:id])
|
||||
end
|
||||
|
||||
def update_booking
|
||||
booking = Booking.find(params[:booking_id])
|
||||
status = booking.update_attributes(booking_status: params[:type])
|
||||
|
||||
if status
|
||||
render json: JSON.generate({:status => true ,:type => params[:type]})
|
||||
|
||||
else
|
||||
render json: JSON.generate({:status => false, :error_message => "Record not found"})
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
# private
|
||||
# def Bookings_params
|
||||
# params.permit(:id, :order_id)
|
||||
|
||||
Reference in New Issue
Block a user