summary refs log tree commit diff
path: root/api/src/routes/users
diff options
context:
space:
mode:
Diffstat (limited to 'api/src/routes/users')
-rw-r--r--api/src/routes/users/@me/activities/statistics/applications.ts2
-rw-r--r--api/src/routes/users/@me/billing/payment-sources.ts2
-rw-r--r--api/src/routes/users/@me/channels.ts7
-rw-r--r--api/src/routes/users/@me/email-settings.ts15
4 files changed, 15 insertions, 11 deletions
diff --git a/api/src/routes/users/@me/activities/statistics/applications.ts b/api/src/routes/users/@me/activities/statistics/applications.ts
index 834be35c..014df8af 100644
--- a/api/src/routes/users/@me/activities/statistics/applications.ts
+++ b/api/src/routes/users/@me/activities/statistics/applications.ts
@@ -5,7 +5,7 @@ const router = Router();
 
 router.get("/", route({}), (req: Request, res: Response) => {
 	// TODO:
-	res.json([]).status(200)
+	res.json([]).status(200);
 });
 
 export default router;
diff --git a/api/src/routes/users/@me/billing/payment-sources.ts b/api/src/routes/users/@me/billing/payment-sources.ts
index 834be35c..014df8af 100644
--- a/api/src/routes/users/@me/billing/payment-sources.ts
+++ b/api/src/routes/users/@me/billing/payment-sources.ts
@@ -5,7 +5,7 @@ const router = Router();
 
 router.get("/", route({}), (req: Request, res: Response) => {
 	// TODO:
-	res.json([]).status(200)
+	res.json([]).status(200);
 });
 
 export default router;
diff --git a/api/src/routes/users/@me/channels.ts b/api/src/routes/users/@me/channels.ts
index b5782eca..78f531e1 100644
--- a/api/src/routes/users/@me/channels.ts
+++ b/api/src/routes/users/@me/channels.ts
@@ -5,8 +5,11 @@ import { route } from "@fosscord/api";
 const router: Router = Router();
 
 router.get("/", route({}), async (req: Request, res: Response) => {
-	const recipients = await Recipient.find({ where: { user_id: req.user_id, closed: false }, relations: ["channel", "channel.recipients"] });
-	res.json(await Promise.all(recipients.map(r => DmChannelDTO.from(r.channel, [req.user_id]))));
+	const recipients = await Recipient.find({
+		where: { user_id: req.user_id, closed: false },
+		relations: ["channel", "channel.recipients"]
+	});
+	res.json(await Promise.all(recipients.map((r) => DmChannelDTO.from(r.channel, [req.user_id]))));
 });
 
 export interface DmChannelCreateSchema {
diff --git a/api/src/routes/users/@me/email-settings.ts b/api/src/routes/users/@me/email-settings.ts
index 2d961a0e..3114984e 100644
--- a/api/src/routes/users/@me/email-settings.ts
+++ b/api/src/routes/users/@me/email-settings.ts
@@ -4,14 +4,15 @@ import { route } from "@fosscord/api";
 const router = Router();
 
 router.get("/", route({}), (req: Request, res: Response) => {
-	// TODO:    
+	// TODO:
 	res.json({
-		categories: { 
-        social: true,
-        communication: true,
-        tips: false,
-        updates_and_announcements: false,
-        recommendations_and_events: false },
+		categories: {
+			social: true,
+			communication: true,
+			tips: false,
+			updates_and_announcements: false,
+			recommendations_and_events: false
+		},
 		initialized: false
 	}).status(200);
 });