use text/plain on /api/metrics

This commit is contained in:
Danny Coates 2019-02-15 11:59:39 -08:00
parent b30be6e4a2
commit 8eaacfea18
No known key found for this signature in database
GPG key ID: 4C442633C62E00CB
4 changed files with 11 additions and 5 deletions

View file

@ -2,7 +2,7 @@ const { sendBatch, clientEvent } = require('../amplitude');
module.exports = async function(req, res) {
try {
const data = req.body;
const data = JSON.parse(req.body); // see http://crbug.com/490015
const deltaT = Date.now() - data.now;
const events = data.events.map(e =>
clientEvent(