diff --git a/server/main.js b/server/main.js index 7c72dc3..63d1aba 100644 --- a/server/main.js +++ b/server/main.js @@ -81,7 +81,6 @@ fastify.addHook('onResponse', async (request, reply) => { }; try { -<<<<<<< HEAD await axios.post( `https://${config['analytics']['plausible_domain']}/api/event/`, event, @@ -91,15 +90,8 @@ fastify.addHook('onResponse', async (request, reply) => { 'Content-Type': 'application/json', 'User-Agent': userAgent, }, -======= - await axios.post(config['analytics']['plausible_api'], event, { - headers: { - Authorization: `Bearer ${config['analytics']['plausible_token']}`, - 'Content-Type': 'application/json', - 'User-Agent': userAgent, ->>>>>>> parent of da7134f (chore(server): Changed the name of the keys. Made it easier to change the domain) }, - }); + ); } catch (error) { fastify.log.error('Error sending event to Plausible:', error.message); } diff --git a/server/routes/metadata.js b/server/routes/metadata.js index bd44014..33427ab 100644 --- a/server/routes/metadata.js +++ b/server/routes/metadata.js @@ -11,7 +11,6 @@ module.exports = async function metadata(fastify) { ); return res.status(200).send({ - timezone: Intl.DateTimeFormat().resolvedOptions().timeZone, first_date: first_date.rows[0]?.date ? first_date.rows[0]?.date : 'None',