From 8ce45a1acdc912fd48dc67dfafc7ec61a85ec4f2 Mon Sep 17 00:00:00 2001 From: Owen Date: Fri, 3 Apr 2026 12:34:37 -0400 Subject: [PATCH] Update casting again --- server/routers/gerbil/receiveBandwidth.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/routers/gerbil/receiveBandwidth.ts b/server/routers/gerbil/receiveBandwidth.ts index 8bd7b90aa..dcd897471 100644 --- a/server/routers/gerbil/receiveBandwidth.ts +++ b/server/routers/gerbil/receiveBandwidth.ts @@ -171,9 +171,8 @@ export async function flushSiteBandwidthToDb(): Promise { } // PostgreSQL: batch UPDATE … FROM (VALUES …) — single round-trip per chunk. - const valuesList = chunk.map( - ([publicKey, { bytesIn, bytesOut }]) => - sql`(${publicKey}, ${bytesIn}::bigint, ${bytesOut}::bigint)` + const valuesList = chunk.map(([publicKey, { bytesIn, bytesOut }]) => + sql`(${publicKey}::text, ${bytesIn}::real, ${bytesOut}::real)` ); const valuesClause = sql.join(valuesList, sql`, `); return dbQueryRows<{ orgId: string; pubKey: string }>(sql`