mirror of
https://github.com/Redume/Kekkai.git
synced 2025-04-02 21:37:36 +03:00
Compare commits
2 commits
1045e497ed
...
8a0b75e9ea
Author | SHA1 | Date | |
---|---|---|---|
8a0b75e9ea | |||
6c07e348b3 |
2 changed files with 1 additions and 10 deletions
|
@ -81,7 +81,6 @@ fastify.addHook('onResponse', async (request, reply) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
<<<<<<< HEAD
|
|
||||||
await axios.post(
|
await axios.post(
|
||||||
`https://${config['analytics']['plausible_domain']}/api/event/`,
|
`https://${config['analytics']['plausible_domain']}/api/event/`,
|
||||||
event,
|
event,
|
||||||
|
@ -91,15 +90,8 @@ fastify.addHook('onResponse', async (request, reply) => {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
'User-Agent': userAgent,
|
'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) {
|
} catch (error) {
|
||||||
fastify.log.error('Error sending event to Plausible:', error.message);
|
fastify.log.error('Error sending event to Plausible:', error.message);
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,6 @@ module.exports = async function metadata(fastify) {
|
||||||
);
|
);
|
||||||
|
|
||||||
return res.status(200).send({
|
return res.status(200).send({
|
||||||
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
||||||
first_date: first_date.rows[0]?.date
|
first_date: first_date.rows[0]?.date
|
||||||
? first_date.rows[0]?.date
|
? first_date.rows[0]?.date
|
||||||
: 'None',
|
: 'None',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue