diff --git a/.codegraph/.gitignore b/.codegraph/.gitignore
new file mode 100644
index 0000000..9de0f16
--- /dev/null
+++ b/.codegraph/.gitignore
@@ -0,0 +1,16 @@
+# CodeGraph data files
+# These are local to each machine and should not be committed
+
+# Database
+*.db
+*.db-wal
+*.db-shm
+
+# Cache
+cache/
+
+# Logs
+*.log
+
+# Hook markers
+.dirty
diff --git a/.codegraph/daemon.pid b/.codegraph/daemon.pid
new file mode 100644
index 0000000..7e71c44
--- /dev/null
+++ b/.codegraph/daemon.pid
@@ -0,0 +1,6 @@
+{
+ "pid": 1742792,
+ "version": "0.9.9",
+ "socketPath": "/home/gjermund/projects/tessera/.codegraph/daemon.sock",
+ "startedAt": 1780994115213
+}
diff --git a/src/routes/tickets.ts b/src/routes/tickets.ts
index cb928c8..5c89f65 100644
--- a/src/routes/tickets.ts
+++ b/src/routes/tickets.ts
@@ -231,9 +231,9 @@ export function createTicketsRouter(db: Db): Hono {
const createdTransactions = await db.insert(transactions).values(txList as any).returning();
const prepared = await scripEngine.prepare(ticket.id, createdTransactions as any);
- await scripEngine.commit(prepared);
+ const results = await scripEngine.commit(prepared);
- return c.json(ticket, 201);
+ return c.json({ ticket, scrip_results: results }, 201);
});
// GET /:id — get ticket with custom field values
diff --git a/web/src/app/page.tsx b/web/src/app/page.tsx
index 4043ef0..a255963 100644
--- a/web/src/app/page.tsx
+++ b/web/src/app/page.tsx
@@ -428,7 +428,7 @@ function TicketWorkbenchContent() {
setNewSubject("");
setNewDescription("");
setNewCustomFieldValues({});
- if (data) router.push(`/tickets/${data.id}`);
+ if (data) router.push(`/tickets/${data.ticket.id}`);
};
if (loading) return ;
diff --git a/web/src/lib/api.ts b/web/src/lib/api.ts
index e572011..74f0b32 100644
--- a/web/src/lib/api.ts
+++ b/web/src/lib/api.ts
@@ -63,8 +63,8 @@ export async function createTicket(data: {
queue_id: string;
description?: string;
custom_fields?: Record;
-}): Promise<{ data: Ticket | null; error: string | null }> {
- return request("/tickets", { method: "POST", body: JSON.stringify(data) });
+}): Promise<{ data: UpdateResult | null; error: string | null }> {
+ return request("/tickets", { method: "POST", body: JSON.stringify(data) });
}
export async function updateTicket(id: number, data: { subject?: string; status?: string; owner_id?: string | null }): Promise<{ data: UpdateResult | null; error: string | null }> {