Compare commits
2 Commits
60d2196e51
...
2501bcbad1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2501bcbad1 | ||
|
|
aa808f1d3f |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -33,3 +33,6 @@ bun.lock
|
||||
|
||||
# Finder (MacOS) folder config
|
||||
.DS_Store
|
||||
|
||||
# Codegraph index (MCP tool)
|
||||
.codegraph
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 <SkeletonWorkbench />;
|
||||
|
||||
@@ -63,8 +63,8 @@ export async function createTicket(data: {
|
||||
queue_id: string;
|
||||
description?: string;
|
||||
custom_fields?: Record<string, string>;
|
||||
}): Promise<{ data: Ticket | null; error: string | null }> {
|
||||
return request<Ticket>("/tickets", { method: "POST", body: JSON.stringify(data) });
|
||||
}): Promise<{ data: UpdateResult | null; error: string | null }> {
|
||||
return request<UpdateResult>("/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 }> {
|
||||
|
||||
Reference in New Issue
Block a user