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