summary refs log tree commit diff
path: root/src/api/routes/users/#id/profile.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/routes/users/#id/profile.ts')
-rw-r--r--src/api/routes/users/#id/profile.ts20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/api/routes/users/#id/profile.ts b/src/api/routes/users/#id/profile.ts
index 7a995a8c..27717c79 100644
--- a/src/api/routes/users/#id/profile.ts
+++ b/src/api/routes/users/#id/profile.ts
@@ -1,6 +1,6 @@
-import { Router, Request, Response } from "express";
-import { PublicConnectedAccount, PublicUser, User, UserPublic, Member } from "@fosscord/util";
 import { route } from "@fosscord/api";
+import { Member, PublicConnectedAccount, User, UserPublic } from "@fosscord/util";
+import { Request, Response, Router } from "express";
 
 const router: Router = Router();
 
@@ -17,22 +17,22 @@ router.get("/", route({ test: { response: { body: "UserProfileResponse" } } }),
 
 	let mutual_guilds: object[] = [];
 	let premium_guild_since;
-	const requested_member = await Member.find( { where: { id: req.params.id, } })
-	const self_member = await Member.find( { where: { id: req.user_id, } })
+	const requested_member = await Member.find({ where: { id: req.params.id } });
+	const self_member = await Member.find({ where: { id: req.user_id } });
 
-	for(const rmem of requested_member) {
-		if(rmem.premium_since) {
-			if(premium_guild_since){
-				if(premium_guild_since > rmem.premium_since) {
+	for (const rmem of requested_member) {
+		if (rmem.premium_since) {
+			if (premium_guild_since) {
+				if (premium_guild_since > rmem.premium_since) {
 					premium_guild_since = rmem.premium_since;
 				}
 			} else {
 				premium_guild_since = rmem.premium_since;
 			}
 		}
-		for(const smem of self_member) {
+		for (const smem of self_member) {
 			if (smem.guild_id === rmem.guild_id) {
-				mutual_guilds.push({id: rmem.guild_id, nick: rmem.nick})
+				mutual_guilds.push({ id: rmem.guild_id, nick: rmem.nick });
 			}
 		}
 	}