Make status code explicit
This commit is contained in:
parent
d4a3f8dadb
commit
4c0d8283e3
@ -6,7 +6,7 @@ class WebhooksController < ApplicationController
|
||||
def lndhub
|
||||
begin
|
||||
payload = JSON.parse(request.body.read, symbolize_names: true)
|
||||
return unless payload[:type] == "incoming"
|
||||
head :no_content and return unless payload[:type] == "incoming"
|
||||
rescue
|
||||
head :unprocessable_entity and return
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user