Skip to content

Commit

Permalink
🐛 fix: fix plugin error
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Aug 17, 2023
1 parent 2f055ce commit 3ca1b29
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion api/v1/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ export default async function handler(req: VercelRequest, res: VercelResponse) {
res.status(405);
}

const result = await fetchContent(req.body);
const data = typeof req.body === 'string' ? JSON.parse(JSON.parse(req.body)) : req.body;

const result = await fetchContent(data);

res.send(result);
}
1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"moduleResolution": "node",
"forceConsistentCasingInFileNames": true,
"noImplicitReturns": true,
"suppressImplicitAnyIndexErrors": true,
"noUnusedLocals": true,
"skipLibCheck": true,
"strict": true
Expand Down

0 comments on commit 3ca1b29

Please sign in to comment.