fix: white home page - coerce pg numeric strings for top-tools ratings
Build & Push Docker Image / build (push) Successful in 2m32s

This commit is contained in:
opencode
2026-08-02 13:10:28 +02:00
parent d033b20dfb
commit 95bf49509c
2 changed files with 47 additions and 29 deletions
+7 -1
View File
@@ -104,7 +104,13 @@ router.get("/analytics/top-tools", async (req, res): Promise<void> => {
? (Number(avgUsefulness) + Number(avgUsability)) / 2
: null;
return {
tool: { ...tool, ratingCount, avgUsefulness, avgUsability, avgCombined },
tool: {
...tool,
ratingCount,
avgUsefulness: avgUsefulness != null ? Number(avgUsefulness) : null,
avgUsability: avgUsability != null ? Number(avgUsability) : null,
avgCombined,
},
score: Number(score),
ratingCount,
};