fix create event
This commit is contained in:
@@ -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> {
|
||||
|
||||
@@ -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: [
|
||||
|
||||
Reference in New Issue
Block a user