fix create event

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-02-05 22:16:09 +01:00
parent fb18e49078
commit 2c20c1e3df
2 changed files with 5 additions and 1 deletions

View File

@@ -11,7 +11,7 @@ import type { JobsOptions } from '@mixan/queue';
import { eventsQueue, findJobByPrefix } from '@mixan/queue';
import type { PostEventPayload } from '@mixan/types';
const SESSION_TIMEOUT = 1000 * 30 * 1;
const SESSION_TIMEOUT = 1000 * 60 * 30;
const SESSION_END_TIMEOUT = SESSION_TIMEOUT + 1000;
function parseSearchParams(params: URLSearchParams): Record<string, string> {

View File

@@ -87,6 +87,10 @@ export function getEvents(sql: string) {
export async function createEvent(payload: IServiceCreateEventPayload) {
console.log(`create event ${payload.name} for ${payload.profileId}`);
if (payload.properties.hash === '') {
delete payload.properties.hash;
}
return ch.insert({
table: 'events',
values: [