(tx: any)
| 6 | |
| 7 | // Generate a transaction ID |
| 8 | async function generateTxId(tx: any): Promise<Txid> { |
| 9 | const result = await tx`SELECT pg_current_xact_id()::xid::text as txid` |
| 10 | const txid = result[0]?.txid |
| 11 | |
| 12 | if (txid === undefined) { |
| 13 | throw new Error(`Failed to get transaction ID`) |
| 14 | } |
| 15 | |
| 16 | return parseInt(txid, 10) |
| 17 | } |
| 18 | |
| 19 | export const Route = createFileRoute(`/api/config`)({ |
| 20 | server: { |