mirror of
https://github.com/umami-software/umami.git
synced 2026-02-11 16:17:13 +01:00
Added lib/types.
This commit is contained in:
parent
06bebadbb9
commit
4781a0cc8c
12 changed files with 247 additions and 242 deletions
|
|
@ -4,7 +4,7 @@ import kafka from 'lib/kafka';
|
|||
import prisma from 'lib/prisma';
|
||||
import { uuid } from 'lib/crypto';
|
||||
import cache from 'lib/cache';
|
||||
import { UmamiApi } from 'lib/constants';
|
||||
import { EventType } from 'lib/types';
|
||||
|
||||
export async function saveEvent(args: {
|
||||
id: string;
|
||||
|
|
@ -43,7 +43,7 @@ async function relationalQuery(data: {
|
|||
sessionId,
|
||||
url: url?.substring(0, URL_LENGTH),
|
||||
referrer: referrer?.substring(0, URL_LENGTH),
|
||||
eventType: UmamiApi.EventType.Event,
|
||||
eventType: EventType.Event,
|
||||
eventName: eventName?.substring(0, EVENT_NAME_LENGTH),
|
||||
eventData,
|
||||
};
|
||||
|
|
@ -77,7 +77,7 @@ async function clickhouseQuery(data: {
|
|||
session_id: sessionId,
|
||||
event_id: uuid(),
|
||||
url: url?.substring(0, URL_LENGTH),
|
||||
event_type: UmamiApi.EventType.Event,
|
||||
event_type: EventType.Event,
|
||||
event_name: eventName?.substring(0, EVENT_NAME_LENGTH),
|
||||
event_data: eventData ? JSON.stringify(eventData) : null,
|
||||
rev_id: website?.revId || 0,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue