Make status code explicit
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user