Skip to content

Commit 0dbc392

Browse files
authored
Update index.ts
1 parent a4e863a commit 0dbc392

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

api/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { NowRequest, NowResponse } from '@vercel/node'
2-
import { getScreenshot } from './_lib/chromium';
2+
import { getScreenshot } from './_lib/puppeteer';
33

44
module.exports = async (req: NowRequest, res: NowResponse) => {
5-
const usage = "https://screenshot.totallyusefulapi.ml/api?url=https://google.com&width=1366&height=625"
5+
const usage = `${req.protocol}://${req.hostname}/api?url=https://google.com&width=1366&height=625`
66
if (!req.query.url) return res.json({
77
"success": false,
88
"error": "No url query specified!",

0 commit comments

Comments
 (0)