Skip to content

Commit 75e3fca

Browse files
committed
fix: change package aws-lambda
1 parent 767c4f6 commit 75e3fca

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,10 +233,10 @@ app.get('/history/charts/:country', async (req, res, next) => {
233233
const page = await browser.newPage();
234234
//page.setViewport({width: 1440, height: 800})
235235
await page.goto(req.protocol + '://' + req.get('host') +'/history/charts/web/'+s.country);
236-
let p = await page.screenshot({type: 'png'});
236+
let p = await page.screenshot({type: 'jpg'});
237237
await browser.close();
238238
res.statusCode = 200;
239-
res.setHeader('Content-Type', `image/png`);
239+
res.setHeader('Content-Type', `image/jpg`);
240240
res.end(p);
241241
//return res.send(`<html><body style="margin:0;padding:0;"><img src="data:image/png;base64, ${p}" width="100%"/></body></html>`)
242242
})

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"blessed": "^0.1.11",
3636
"blessed-contrib": "^2.3.1",
3737
"bufferutil": "^4.0.1",
38-
"chrome-aws-lambda": "^2.1.1",
38+
"chrome-aws-lambda": "1.11.1",
3939
"clear": "^0.1.0",
4040
"cli-table3": "^0.5.1",
4141
"express": "^4.17.1",

0 commit comments

Comments
 (0)