summary refs log tree commit diff
path: root/api/src/routes/users/@me
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-18 01:49:17 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-18 01:49:17 +0200
commit96c2485bafc2433316db1ed6372b0e083c25ccc6 (patch)
tree09f043415db9dd59ddb5089d3eaadf3895462de2 /api/src/routes/users/@me
parent:bug: fix body parse treating null not as undefined (except for icons/avatars) (diff)
downloadserver-96c2485bafc2433316db1ed6372b0e083c25ccc6.tar.xz
:pencil: add default route description to all routes
Diffstat (limited to 'api/src/routes/users/@me')
-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
4 files changed, 11 insertions, 8 deletions
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 } }));
 });