diff --git a/src/filters/clean-event-urls.js b/src/filters/clean-event-urls.js index fbe049e..3d965bf 100644 --- a/src/filters/clean-event-urls.js +++ b/src/filters/clean-event-urls.js @@ -2,7 +2,7 @@ const cleanObjectUrls = require('../utils/clean-object-urls'); const cleanEventUrls = (inputEvents) => { const outputEvents = []; inputEvents.forEach(event => { - const cloneEvent = {...event}; + const cloneEvent = cleanEventUrls({...event}); cloneEvent.event_properties = cleanObjectUrls(event.event_properties || {}); cloneEvent.user_properties = cleanObjectUrls(event.user_properties || {}); outputEvents.push(cloneEvent); diff --git a/src/routes/collect-auto.js b/src/routes/collect-auto.js index 66191b2..6c1ee77 100644 --- a/src/routes/collect-auto.js +++ b/src/routes/collect-auto.js @@ -94,7 +94,7 @@ const customHandler = function (request, reply, ingresses) { reply.send(response.data); } else if (request.query.debug) { collectCounter.labels('success_with_debug', appName, teamName).inc(); - reply.send(response.data); + reply.send(response); } else { collectCounter.labels('success', appName, teamName).inc(); if(request.body.events && request.body.events !== null) {