add additional/missing tests

This commit is contained in:
Michael C
2022-09-20 23:22:21 -04:00
parent f5bafa2868
commit 3f470a72f5
7 changed files with 271 additions and 7 deletions

View File

@@ -7,7 +7,11 @@ export async function getDaysSavedFormatted(req: Request, res: Response): Promis
if (row !== undefined) {
//send this result
return res.send({
daysSaved: row.daysSaved.toFixed(2),
daysSaved: row.daysSaved?.toFixed(2) ?? "0",
});
} else {
return res.send({
daysSaved: 0
});
}
}