fix: dont count session events for current billing period

This commit is contained in:
Carl-Gerhard Lindesvärd
2025-11-12 14:54:09 +01:00
parent 723ba3ef6c
commit e613a4e01c
2 changed files with 3 additions and 1 deletions

View File

@@ -104,7 +104,7 @@ export async function getProjects({
export const getProjectEventsCount = async (projectId: string) => {
const res = await chQuery<{ count: number }>(
`SELECT count(*) as count FROM ${TABLE_NAMES.events} WHERE project_id = ${sqlstring.escape(projectId)}`,
`SELECT count(*) as count FROM ${TABLE_NAMES.events} WHERE project_id = ${sqlstring.escape(projectId)} AND name NOT IN ('session_start', 'session_end')`,
);
return res[0]?.count;
};