fix: trace

This commit is contained in:
手瓜一十雪
2024-12-30 16:47:33 +08:00
parent e650be1fc5
commit bac4079b3d
4 changed files with 12 additions and 12 deletions

View File

@@ -63,12 +63,12 @@ export class UmamiTraceCore {
this.sendRequest(payload);
}
sendTrace(eventName: string) {
sendTrace(eventName: string, data: string = '') {
const payload = {
website: this.website,
hostname: this.hostname,
title: 'NapCat ' + this.napcatVersion,
url: `/${this.qqversion}/${this.napcatVersion}/${eventName}`,
url: `/${this.qqversion}/${this.napcatVersion}/${eventName}` + (!!data ? `?data=${data}` : ''),
referrer: this.referrer,
};
this.sendRequest(payload);