Skip to content

Commit a41f909

Browse files
authored
Update index.ts
1 parent e19cc24 commit a41f909

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

api/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ import { NowRequest, NowResponse } from '@vercel/node'
22
import { getScreenshot } from './_lib/chromium';
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"
56
if (!req.query.url) return res.json({
67
"success": false,
78
"error": "No url query specified!",
8-
"usage": "https://screenshot.totallyusefulapi.ml/api?url=https://totallyusefulapi.ml&width=930&height=625"
9+
"usage": usage
910
});
1011
try {
1112
const file = await getScreenshot(req.query.url, req.query.width, req.query.height);
@@ -17,7 +18,7 @@ module.exports = async (req: NowRequest, res: NowResponse) => {
1718
res.json({
1819
"success": false,
1920
"error": "Invalid url query!",
20-
"usage": "https://screenshot.totallyusefulapi.ml/api?url=https://totallyusefulapi.ml&width=930&height=625"
21+
"usage": usage
2122
});
2223
}
2324
}

0 commit comments

Comments
 (0)