diff --git a/src/api/routes/gifs/search.ts b/src/api/routes/gifs/search.ts
index 3869bbe6b..04e2013ad 100644
--- a/src/api/routes/gifs/search.ts
+++ b/src/api/routes/gifs/search.ts
@@ -26,6 +26,7 @@ import {
import { Request, Response, Router } from "express";
import fetch from "node-fetch-commonjs";
import { ProxyAgent } from "proxy-agent";
+import http from "http";
const router = Router();
@@ -67,7 +68,7 @@ router.get(
const response = await fetch(
`https://g.tenor.com/v1/search?q=${q}&media_format=${media_format}&locale=${locale}&key=${apiKey}`,
{
- agent,
+ agent: agent as http.Agent,
method: "get",
headers: { "Content-Type": "application/json" },
},
diff --git a/src/api/routes/gifs/trending-gifs.ts b/src/api/routes/gifs/trending-gifs.ts
index f19874e6d..34428a546 100644
--- a/src/api/routes/gifs/trending-gifs.ts
+++ b/src/api/routes/gifs/trending-gifs.ts
@@ -26,6 +26,7 @@ import {
import { Request, Response, Router } from "express";
import fetch from "node-fetch-commonjs";
import { ProxyAgent } from "proxy-agent";
+import http from "http";
const router = Router();
@@ -62,7 +63,7 @@ router.get(
const response = await fetch(
`https://g.tenor.com/v1/trending?media_format=${media_format}&locale=${locale}&key=${apiKey}`,
{
- agent,
+ agent: agent as http.Agent,
method: "get",
headers: { "Content-Type": "application/json" },
},
diff --git a/src/api/routes/gifs/trending.ts b/src/api/routes/gifs/trending.ts
index 2c43a501f..c95d8fbbd 100644
--- a/src/api/routes/gifs/trending.ts
+++ b/src/api/routes/gifs/trending.ts
@@ -26,6 +26,7 @@ import {
import { Request, Response, Router } from "express";
import fetch from "node-fetch-commonjs";
import { ProxyAgent } from "proxy-agent";
+import http from "http";
const router = Router();
@@ -58,7 +59,7 @@ router.get(
fetch(
`https://g.tenor.com/v1/categories?locale=${locale}&key=${apiKey}`,
{
- agent,
+ agent: agent as http.Agent,
method: "get",
headers: { "Content-Type": "application/json" },
},
@@ -66,7 +67,7 @@ router.get(
fetch(
`https://g.tenor.com/v1/trending?locale=${locale}&key=${apiKey}`,
{
- agent,
+ agent: agent as http.Agent,
method: "get",
headers: { "Content-Type": "application/json" },
},
|