diff --git a/src/routes/users/@me/affinities/guilds.ts b/src/routes/users/@me/affinities/guilds.ts
index ea0fe59d..fa6be0e7 100644
--- a/src/routes/users/@me/affinities/guilds.ts
+++ b/src/routes/users/@me/affinities/guilds.ts
@@ -1,8 +1,8 @@
-import { Router } from "express";
+import { Router, Response, Request } from "express";
const router = Router();
-router.get("/", (req, res) => {
+router.get("/", (req: Request, res: Response) => {
// TODO:
res.status(200).send({ guild_affinities: [] });
});
diff --git a/src/routes/users/@me/affinities/user.ts b/src/routes/users/@me/affinities/user.ts
index 2e435995..0790a8a4 100644
--- a/src/routes/users/@me/affinities/user.ts
+++ b/src/routes/users/@me/affinities/user.ts
@@ -1,8 +1,8 @@
-import { Router } from "express";
+import { Router, Response, Request } from "express";
const router = Router();
-router.get("/", (req, res) => {
+router.get("/", (req: Request, res: Response) => {
// TODO:
res.status(200).send({ user_affinities: [], inverse_user_affinities: [] });
});
diff --git a/src/routes/users/@me/channels.ts b/src/routes/users/@me/channels.ts
index 4cab869b..a425a25f 100644
--- a/src/routes/users/@me/channels.ts
+++ b/src/routes/users/@me/channels.ts
@@ -23,7 +23,7 @@ router.get("/", async (req: Request, res: Response) => {
res.json(toObject(channels));
});
-router.post("/", check(DmChannelCreateSchema), async (req, res) => {
+router.post("/", check(DmChannelCreateSchema), async (req: Request, res: Response) => {
const body = req.body as DmChannelCreateSchema;
body.recipients = body.recipients.filter((x) => x !== req.user_id).unique();
diff --git a/src/routes/users/@me/disable.ts b/src/routes/users/@me/disable.ts
index ab3ce58c..b16ef783 100644
--- a/src/routes/users/@me/disable.ts
+++ b/src/routes/users/@me/disable.ts
@@ -1,8 +1,8 @@
-import { Router } from "express";
+import { Router, Response, Request } from "express";
const router = Router();
-router.post("/", (req, res) => {
+router.post("/", (req: Request, res: Response) => {
// TODO:
res.sendStatus(204);
});
diff --git a/src/routes/users/@me/library.ts b/src/routes/users/@me/library.ts
index 2ffff851..d771cb5e 100644
--- a/src/routes/users/@me/library.ts
+++ b/src/routes/users/@me/library.ts
@@ -1,8 +1,8 @@
-import { Router } from "express";
+import { Router, Response, Request } from "express";
const router = Router();
-router.get("/", (req, res) => {
+router.get("/", (req: Request, res: Response) => {
// TODO:
res.status(200).send([]);
});
diff --git a/src/routes/users/@me/relationships.ts b/src/routes/users/@me/relationships.ts
index 788b1a0a..b874ec9a 100644
--- a/src/routes/users/@me/relationships.ts
+++ b/src/routes/users/@me/relationships.ts
@@ -6,7 +6,7 @@ import {
RelationshipType,
RelationshipRemoveEvent
} from "@fosscord/server-util";
-import { Router } from "express";
+import { Router, Response, Request } from "express";
import { check, HTTPError } from "lambert-server";
import { emitEvent } from "../../../util/Event";
@@ -14,7 +14,7 @@ const router = Router();
const userProjection = { "user_data.relationships": true, ...PublicUserProjection };
-router.put("/:id", check({ $type: Number }), async (req, res) => {
+router.put("/:id", check({ $type: Number }), async (req: Request, res: Response) => {
const { id } = req.params;
if (id === req.user_id) throw new HTTPError("You can't add yourself as a friend");
const body = req.body as { type?: number };
@@ -107,7 +107,7 @@ router.put("/:id", check({ $type: Number }), async (req, res) => {
return res.sendStatus(204);
});
-router.delete("/:id", async (req, res) => {
+router.delete("/:id", async (req: Request, res: Response) => {
const { id } = req.params;
if (id === req.user_id) throw new HTTPError("You can't remove yourself as a friend");
diff --git a/src/routes/users/@me/settings.ts b/src/routes/users/@me/settings.ts
index f1d95caf..cca9b3ab 100644
--- a/src/routes/users/@me/settings.ts
+++ b/src/routes/users/@me/settings.ts
@@ -1,8 +1,8 @@
-import { Router } from "express";
+import { Router, Response, Request } from "express";
const router = Router();
-router.patch("/", (req, res) => {
+router.patch("/", (req: Request, res: Response) => {
// TODO:
res.sendStatus(204);
});
|