Skip to content

Commit

Permalink
chore: remove node-fetch comment
Browse files Browse the repository at this point in the history
  • Loading branch information
zzdhybthu committed Nov 18, 2024
1 parent 6fb6616 commit bb4e7c8
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion src/middlewares/recaptcha.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { NextFunction, Request, Response } from "express";
import { URLSearchParams } from "url";
// import fetch from "node-fetch";

const recaptcha = async (req: Request, res: Response, next: NextFunction) => {
if (!req.body.recaptcha) {
Expand Down
1 change: 0 additions & 1 deletion src/routes/docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ router.get("/get_video_link", async (req, res) => {
try {
if (!req.query.url) return res.status(400).send("400 Bad Request: no url provided!");
const url: any = req.query.url;
// const fetch = (await import('node-fetch')).default;
const response = await fetch(
url,
{ method: "GET"}
Expand Down
3 changes: 1 addition & 2 deletions src/routes/weekly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ const router = express.Router();
router.get("/cover", async (req, res) => {
try {
if (!req.query.url) return res.status(400).send("400 Bad Request: no url provided!");
const url: any = req.query.url;
// const fetch = (await import('node-fetch')).default;
const url: any = req.query.url;g

Check failure on line 10 in src/routes/weekly.ts

View workflow job for this annotation

GitHub Actions / test

Cannot find name 'g'.
const response = await fetch(
url,
{ method: "GET"}
Expand Down

0 comments on commit bb4e7c8

Please sign in to comment.