mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Added created date to session data save.
This commit is contained in:
parent
eda18d3795
commit
440db17000
2 changed files with 3 additions and 6 deletions
|
|
@ -144,9 +144,7 @@ export default async (req: NextApiRequestCollect, res: NextApiResponse) => {
|
|||
...session,
|
||||
sessionId: session.id,
|
||||
});
|
||||
}
|
||||
|
||||
if (type === COLLECTION_TYPE.identify) {
|
||||
} else if (type === COLLECTION_TYPE.identify) {
|
||||
if (!data) {
|
||||
return badRequest(res, 'Data required.');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ export async function saveSessionData(data: {
|
|||
websiteId: string;
|
||||
sessionId: string;
|
||||
sessionData: DynamicData;
|
||||
createdAt?: string;
|
||||
}) {
|
||||
return runQuery({
|
||||
[PRISMA]: () => relationalQuery(data),
|
||||
|
|
@ -78,12 +77,12 @@ async function clickhouseQuery(data: {
|
|||
websiteId: string;
|
||||
sessionId: string;
|
||||
sessionData: DynamicData;
|
||||
createdAt?: string;
|
||||
}) {
|
||||
const { websiteId, sessionId, sessionData, createdAt } = data;
|
||||
const { websiteId, sessionId, sessionData } = data;
|
||||
|
||||
const { insert } = clickhouse;
|
||||
const { getDateFormat, sendMessages } = kafka;
|
||||
const createdAt = getDateFormat(new Date());
|
||||
|
||||
const jsonKeys = flattenJSON(sessionData);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue