Add Webhooks and XMPP notifications for incoming sats #79
@@ -6,7 +6,7 @@ class WebhooksController < ApplicationController
|
||||
def lndhub
|
||||
begin
|
||||
payload = JSON.parse(request.body.read, symbolize_names: true)
|
||||
|
raucao marked this conversation as resolved
|
||||
return unless payload[:type] == "incoming"
|
||||
head :no_content and return unless payload[:type] == "incoming"
|
||||
rescue
|
||||
head :unprocessable_entity and return
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user
doesn't rails automatically parse the JSON because the proper content type is set?
so
params[:type]andparams[:user_login]should be enough?I didn't know, so I tried (also with explicitly setting the content type in the spec). Doesn't do it.