mirror of
https://github.com/kremalicious/umami.git
synced 2025-02-07 09:55:45 +01:00
Updated telemetry endpoint.
This commit is contained in:
parent
a10d421e77
commit
25feee662b
@ -5,7 +5,7 @@ const isCI = require('is-ci');
|
|||||||
const pkg = require('../package.json');
|
const pkg = require('../package.json');
|
||||||
|
|
||||||
const dest = path.resolve(__dirname, '../.next/cache/umami.json');
|
const dest = path.resolve(__dirname, '../.next/cache/umami.json');
|
||||||
const url = 'https://telemetry.umami.is/api/send';
|
const url = 'https://api.umami.is/v1/telemetry';
|
||||||
|
|
||||||
async function sendTelemetry(action) {
|
async function sendTelemetry(action) {
|
||||||
let json = {};
|
let json = {};
|
||||||
@ -24,7 +24,6 @@ async function sendTelemetry(action) {
|
|||||||
|
|
||||||
const { default: isDocker } = await import('is-docker');
|
const { default: isDocker } = await import('is-docker');
|
||||||
const { default: fetch } = await import('node-fetch');
|
const { default: fetch } = await import('node-fetch');
|
||||||
const upgrade = json.version !== undefined && json.version !== pkg.version;
|
|
||||||
|
|
||||||
const payload = {
|
const payload = {
|
||||||
action,
|
action,
|
||||||
@ -33,10 +32,9 @@ async function sendTelemetry(action) {
|
|||||||
platform: os.platform(),
|
platform: os.platform(),
|
||||||
arch: os.arch(),
|
arch: os.arch(),
|
||||||
os: `${os.type()} (${os.version()})`,
|
os: `${os.type()} (${os.version()})`,
|
||||||
docker: isDocker(),
|
isDocker: isDocker(),
|
||||||
ci: isCI,
|
isCi: isCI,
|
||||||
prev: json.version,
|
prevVersion: json.version,
|
||||||
upgrade,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user