added iimages
This commit is contained in:
@@ -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);
|
||||
};
|
||||
Reference in New Issue
Block a user