summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--api/src/routes/applications/detectable.ts5
-rw-r--r--api/src/routes/guilds/#guild_id/channels.ts2
-rw-r--r--api/src/routes/guilds/#guild_id/roles.ts2
-rw-r--r--api/src/routes/outbound-promotions.ts5
-rw-r--r--api/src/routes/store/applications.ts9
-rw-r--r--api/src/routes/store/skus.ts7
-rw-r--r--api/src/routes/users/@me/applications/#app_id/entitlements.ts5
-rw-r--r--api/src/routes/users/@me/billing/country-code.ts7
-rw-r--r--api/src/routes/users/@me/billing/subscriptions.ts5
-rw-r--r--api/src/routes/users/@me/index.ts2
10 files changed, 28 insertions, 21 deletions
diff --git a/api/src/routes/applications/detectable.ts b/api/src/routes/applications/detectable.ts
index e4fbe1e4..411e95bf 100644
--- a/api/src/routes/applications/detectable.ts
+++ b/api/src/routes/applications/detectable.ts
@@ -1,10 +1,11 @@
 import { Request, Response, Router } from "express";
+import { route } from "@fosscord/api";
 
 const router: Router = Router();
 
-router.get("/", async (req: Request, res: Response) => {
+router.get("/", route({}), async (req: Request, res: Response) => {
 	//TODO
 	res.json([]).status(200);
 });
 
-export default router;
\ No newline at end of file
+export default router;
diff --git a/api/src/routes/guilds/#guild_id/channels.ts b/api/src/routes/guilds/#guild_id/channels.ts
index 13c6b515..a36e5448 100644
--- a/api/src/routes/guilds/#guild_id/channels.ts
+++ b/api/src/routes/guilds/#guild_id/channels.ts
@@ -5,7 +5,7 @@ import { route } from "@fosscord/api";
 import { ChannelModifySchema } from "../../channels/#channel_id";
 const router = Router();
 
-router.get("/", async (req: Request, res: Response) => {
+router.get("/", route({}), async (req: Request, res: Response) => {
 	const { guild_id } = req.params;
 	const channels = await Channel.find({ guild_id });
 
diff --git a/api/src/routes/guilds/#guild_id/roles.ts b/api/src/routes/guilds/#guild_id/roles.ts
index bac63bd4..d1d60906 100644
--- a/api/src/routes/guilds/#guild_id/roles.ts
+++ b/api/src/routes/guilds/#guild_id/roles.ts
@@ -29,7 +29,7 @@ export type RolePositionUpdateSchema = {
 	position: number;
 }[];
 
-router.get("/", async (req: Request, res: Response) => {
+router.get("/", route({}), async (req: Request, res: Response) => {
 	const guild_id = req.params.guild_id;
 
 	await Member.IsInGuildOrFail(req.user_id, guild_id);
diff --git a/api/src/routes/outbound-promotions.ts b/api/src/routes/outbound-promotions.ts
index e4fbe1e4..411e95bf 100644
--- a/api/src/routes/outbound-promotions.ts
+++ b/api/src/routes/outbound-promotions.ts
@@ -1,10 +1,11 @@
 import { Request, Response, Router } from "express";
+import { route } from "@fosscord/api";
 
 const router: Router = Router();
 
-router.get("/", async (req: Request, res: Response) => {
+router.get("/", route({}), async (req: Request, res: Response) => {
 	//TODO
 	res.json([]).status(200);
 });
 
-export default router;
\ No newline at end of file
+export default router;
diff --git a/api/src/routes/store/applications.ts b/api/src/routes/store/applications.ts
index 69cd716d..352c1752 100644
--- a/api/src/routes/store/applications.ts
+++ b/api/src/routes/store/applications.ts
@@ -1,11 +1,12 @@
 import { Request, Response, Router } from "express";
+import { route } from "@fosscord/api";
 
 const router: Router = Router();
 
-router.get("/applications/:id", async (req: Request, res: Response) => {
-	//TODO 
-    const { id } = req.params;
+router.get("/applications/:id", route({}), async (req: Request, res: Response) => {
+	//TODO
+	const { id } = req.params;
 	res.json([]).status(200);
 });
 
-export default router;
\ No newline at end of file
+export default router;
diff --git a/api/src/routes/store/skus.ts b/api/src/routes/store/skus.ts
index 5c37850d..7d0e12eb 100644
--- a/api/src/routes/store/skus.ts
+++ b/api/src/routes/store/skus.ts
@@ -1,11 +1,12 @@
 import { Request, Response, Router } from "express";
+import { route } from "@fosscord/api";
 
 const router: Router = Router();
 
-router.get("/skus/:id", async (req: Request, res: Response) => {
+router.get("/skus/:id", route({}), async (req: Request, res: Response) => {
 	//TODO
-    const { id } = req.params;
+	const { id } = req.params;
 	res.json([]).status(200);
 });
 
-export default router;
\ No newline at end of file
+export default router;
diff --git a/api/src/routes/users/@me/applications/#app_id/entitlements.ts b/api/src/routes/users/@me/applications/#app_id/entitlements.ts
index e4fbe1e4..411e95bf 100644
--- a/api/src/routes/users/@me/applications/#app_id/entitlements.ts
+++ b/api/src/routes/users/@me/applications/#app_id/entitlements.ts
@@ -1,10 +1,11 @@
 import { Request, Response, Router } from "express";
+import { route } from "@fosscord/api";
 
 const router: Router = Router();
 
-router.get("/", async (req: Request, res: Response) => {
+router.get("/", route({}), async (req: Request, res: Response) => {
 	//TODO
 	res.json([]).status(200);
 });
 
-export default router;
\ No newline at end of file
+export default router;
diff --git a/api/src/routes/users/@me/billing/country-code.ts b/api/src/routes/users/@me/billing/country-code.ts
index ac3653a2..33d40796 100644
--- a/api/src/routes/users/@me/billing/country-code.ts
+++ b/api/src/routes/users/@me/billing/country-code.ts
@@ -1,10 +1,11 @@
 import { Request, Response, Router } from "express";
+import { route } from "@fosscord/api";
 
 const router: Router = Router();
 
-router.get("/", async (req: Request, res: Response) => {
+router.get("/", route({}), async (req: Request, res: Response) => {
 	//TODO
-	res.json({ "country_code": "US" }).status(200);
+	res.json({ country_code: "US" }).status(200);
 });
 
-export default router;
\ No newline at end of file
+export default router;
diff --git a/api/src/routes/users/@me/billing/subscriptions.ts b/api/src/routes/users/@me/billing/subscriptions.ts
index e4fbe1e4..411e95bf 100644
--- a/api/src/routes/users/@me/billing/subscriptions.ts
+++ b/api/src/routes/users/@me/billing/subscriptions.ts
@@ -1,10 +1,11 @@
 import { Request, Response, Router } from "express";
+import { route } from "@fosscord/api";
 
 const router: Router = Router();
 
-router.get("/", async (req: Request, res: Response) => {
+router.get("/", route({}), async (req: Request, res: Response) => {
 	//TODO
 	res.json([]).status(200);
 });
 
-export default router;
\ No newline at end of file
+export default router;
diff --git a/api/src/routes/users/@me/index.ts b/api/src/routes/users/@me/index.ts
index da2f3348..67b11ce0 100644
--- a/api/src/routes/users/@me/index.ts
+++ b/api/src/routes/users/@me/index.ts
@@ -23,7 +23,7 @@ export interface UserModifySchema {
 	code?: string;
 }
 
-router.get("/", async (req: Request, res: Response) => {
+router.get("/", route({}), async (req: Request, res: Response) => {
 	res.json(await User.findOne({ select: PrivateUserProjection, where: { id: req.user_id } }));
 });