fix: use sql tagged template for pg_notify instead of db.execute
This commit is contained in:
@@ -27,5 +27,5 @@ export async function recordActivity(params: RecordActivityParams): Promise<void
|
|||||||
|
|
||||||
// Notify SSE subscribers
|
// Notify SSE subscribers
|
||||||
const payload = JSON.stringify({ type: entityType, action, id: entityId, workspace_id: workspaceId });
|
const payload = JSON.stringify({ type: entityType, action, id: entityId, workspace_id: workspaceId });
|
||||||
await db.execute(sql.unsafe(`SELECT pg_notify('project_e_events', '${payload}')`));
|
await sql`SELECT pg_notify('project_e_events', ${payload}::text)`;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user