I have a controller with three actions in them which should get deployed to three lambda’s which it does, but only one lambda seems to be writting logs to cloudwatch. The other two do not create logs even though testing the endpoint shows they are actually firing. I can’t figure why?
Anyone have some pointers?
Jets.application.routes.draw do
post “checkfront_booking_change”, to: “checkfront#bookingchange”
post “checkfront_payment_transaction”, to: “checkfront#paymenttransaction”
get “checkfront_authentication_callback”, to: “checkfront#authenticationcallback”
end
class CheckfrontController < ApplicationController
def bookingchange
write_log “Checkfront booking change webhook triggered”
write_log “payload: #{params}”
render json: {success: true, status: 200, message: "bookingchange triggered and run without error"}
end
def paymenttransaction
write_log “Checkfront payment transaction webhook triggered”
write_log “payload: #{params}”
render json: {success: true, status: 200, message: "paymenttransaction triggered and run without error"}
end
def authenticationcallback
write_log “Checkfront OAuth Authentication Callback triggered”
write_log “payload: #{params}”
render json: {success: true, status: 200, message: "authenticationcallback triggered and run without error"}
end
def write_log(text)
puts “integrations - #{text}” unless Jets.env == “test”
end
end