Commit 48e3aa7e authored by Cool Fire's avatar Cool Fire

I don't quite recall why I changed this on the production server, but it was probably useful

parent 8e015c5c
Pipeline #2045 failed with stages
in 1 minute and 22 seconds
......@@ -29,8 +29,8 @@ end
post '/v1/message' do
check_key params[:key]
return 'Parameter dest is missing' unless params.key? :dest
return 'Parameter message is missing' unless params.key? :message
return 'Parameter dest is missing' unless params.key? 'dest'
return 'Parameter message is missing' unless params.key? 'message'
forward_message({ dest: params[:dest], message: params[:message] }.to_json)
......@@ -40,7 +40,7 @@ end
post '/v1/webhook/:webhook_key' do
check_webhook_key params[:webhook_key]
halt 400 unless params.key? :payload
halt 400 unless params.key? 'payload'
payload = JSON.parse(params[:payload])
halt 400 unless payload.key? 'text'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment