From 2003186112859408f5cb9ad8ccac3d2301934bd5 Mon Sep 17 00:00:00 2001 From: Kelly Lim Date: Fri, 17 Oct 2025 16:11:12 +0800 Subject: [PATCH] fix: convert PostgreSQL BigInt to number for podcast count display --- src/routes/(protected)/(core)/learning/+page.server.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/routes/(protected)/(core)/learning/+page.server.ts b/src/routes/(protected)/(core)/learning/+page.server.ts index 8f170b39..bf9f36bb 100644 --- a/src/routes/(protected)/(core)/learning/+page.server.ts +++ b/src/routes/(protected)/(core)/learning/+page.server.ts @@ -43,8 +43,13 @@ export const load: PageServerLoad = async (event) => { GROUP BY c.id; `; + const collection = collections.map((collection) => ({ + ...collection, + numberOfPodcasts: Number(collection.numberOfPodcasts), + })); + return { - collections, + collections: collection, username: user.name, }; };