reverse accidently changes

This commit is contained in:
olegphenomenon 2023-05-04 16:14:44 +03:00
parent 0ac383843d
commit dafa60bbbe

View file

@ -1,16 +1,10 @@
module EisBilling module EisBilling
class InvoicesController < BaseController class InvoicesController < BaseController
before_action :load_invoice, only: :update before_action :load_invoice, only: :update
skip_before_action :verify_authenticity_token, only: [:update]
def update def update
state = InvoiceStateMachine.new(invoice: @invoice, status: params[:status]) state = InvoiceStateMachine.new(invoice: @invoice, status: params[:status])
puts '-----'
puts @invoice
params[:status]
puts '----'
if @invoice.update(modified_params) && state.call if @invoice.update(modified_params) && state.call
render json: { render json: {
message: 'Invoice data was successfully updated', message: 'Invoice data was successfully updated',