-2
以下是我webhooks_controller.rb:我的rails應用程序中的語法錯誤在哪裏?
class WebhooksController < ApplicationController
before_action :auth_anybody!
skip_before_filter :verify_authenticity_token
def tx
if params[:type] == "transaction" && params[:hash].present?
AMQPQueue.enqueue(:deposit_coin, txid: params[:hash], channel_key: "satoshi")
render :json => { :status => "queued" }
end
end
而且我發現了以下錯誤:
webhooks_controller.rb:10: syntax error, unexpected end-of-input, expecting keyword_end (SyntaxError)
一切看起來OK。我的錯誤在哪裏?
你忘了''結束'如果'。 – Pavan