fix: white home page - coerce pg numeric strings for top-tools ratings
Build & Push Docker Image / build (push) Successful in 2m32s
Build & Push Docker Image / build (push) Successful in 2m32s
This commit is contained in:
@@ -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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user