added iimages

This commit is contained in:
2022-03-21 07:08:05 +00:00
parent 2d53141f42
commit de86f086eb
789 changed files with 24 additions and 14 deletions
@@ -27,7 +27,7 @@ const ApiResponse = async (req, res) => {
let x = canvas.width / 2 + 80;
let y = canvas.height - canvas.height / 2.5;
let imageStr = imageRef.days;
let imageStr = imageRef.sleeps;
//console.log(imageStr, x, y);
ctx.lineWidth = 25;
@@ -77,10 +77,8 @@ const ApiResponse = async (req, res) => {
const png = canvas.toBuffer("image/png");
res.setHeader(
"Cache-Control",
"s-maxage=0",
"content-disposition",
"attachment; filename=" + imageRef.days + "-sleeps.png"
"attachment; filename=" + imageRef.sleeps + "-sleeps.png"
);
res.status(200).send(png);
};