summary refs log tree commit diff
path: root/src/api/routes/v9/users/@me
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-01-14 13:33:24 +0100
committerTheArcaneBrony <myrainbowdash949@gmail.com>2023-01-14 13:33:24 +0100
commit32b93c857f89283f276be5ae2e39c9d11c87fece (patch)
treedf7b4bcd0f375d06f2d5d4333f491680a0973cb6 /src/api/routes/v9/users/@me
parentMove isTextChannel to channel (diff)
downloadserver-32b93c857f89283f276be5ae2e39c9d11c87fece.tar.xz
var -> let
Signed-off-by: TheArcaneBrony <myrainbowdash949@gmail.com>
Diffstat (limited to 'src/api/routes/v9/users/@me')
-rw-r--r--src/api/routes/v9/users/@me/guilds/#guild_id/settings.ts2
-rw-r--r--src/api/routes/v9/users/@me/index.ts4
-rw-r--r--src/api/routes/v9/users/@me/mfa/codes-verification.ts2
-rw-r--r--src/api/routes/v9/users/@me/mfa/codes.ts2
-rw-r--r--src/api/routes/v9/users/@me/relationships.ts6
5 files changed, 8 insertions, 8 deletions
diff --git a/src/api/routes/v9/users/@me/guilds/#guild_id/settings.ts b/src/api/routes/v9/users/@me/guilds/#guild_id/settings.ts
index 436261d4..d84edb41 100644
--- a/src/api/routes/v9/users/@me/guilds/#guild_id/settings.ts
+++ b/src/api/routes/v9/users/@me/guilds/#guild_id/settings.ts
@@ -25,7 +25,7 @@ router.patch(
 		const body = req.body as UserGuildSettingsSchema;
 
 		if (body.channel_overrides) {
-			for (var channel in body.channel_overrides) {
+			for (let channel in body.channel_overrides) {
 				Channel.findOneOrFail({ where: { id: channel } });
 			}
 		}
diff --git a/src/api/routes/v9/users/@me/index.ts b/src/api/routes/v9/users/@me/index.ts
index 37356d9d..42c820f8 100644
--- a/src/api/routes/v9/users/@me/index.ts
+++ b/src/api/routes/v9/users/@me/index.ts
@@ -37,7 +37,7 @@ router.patch(
 		});
 
 		// Populated on password change
-		var newToken: string | undefined;
+		let newToken: string | undefined;
 
 		if (body.avatar)
 			body.avatar = await handleFile(
@@ -102,7 +102,7 @@ router.patch(
 		}
 
 		if (body.username) {
-			var check_username = body?.username?.replace(/\s/g, "");
+			let check_username = body?.username?.replace(/\s/g, "");
 			if (!check_username) {
 				throw FieldErrors({
 					username: {
diff --git a/src/api/routes/v9/users/@me/mfa/codes-verification.ts b/src/api/routes/v9/users/@me/mfa/codes-verification.ts
index 3411605b..e278c5ec 100644
--- a/src/api/routes/v9/users/@me/mfa/codes-verification.ts
+++ b/src/api/routes/v9/users/@me/mfa/codes-verification.ts
@@ -20,7 +20,7 @@ router.post(
 
 		const user = await User.findOneOrFail({ where: { id: req.user_id } });
 
-		var codes: BackupCode[];
+		let codes: BackupCode[];
 		if (regenerate) {
 			await BackupCode.update(
 				{ user: { id: req.user_id } },
diff --git a/src/api/routes/v9/users/@me/mfa/codes.ts b/src/api/routes/v9/users/@me/mfa/codes.ts
index 33053028..32f32772 100644
--- a/src/api/routes/v9/users/@me/mfa/codes.ts
+++ b/src/api/routes/v9/users/@me/mfa/codes.ts
@@ -33,7 +33,7 @@ router.post(
 			});
 		}
 
-		var codes: BackupCode[];
+		let codes: BackupCode[];
 		if (regenerate) {
 			await BackupCode.update(
 				{ user: { id: req.user_id } },
diff --git a/src/api/routes/v9/users/@me/relationships.ts b/src/api/routes/v9/users/@me/relationships.ts
index 3eec704b..6b5d429c 100644
--- a/src/api/routes/v9/users/@me/relationships.ts
+++ b/src/api/routes/v9/users/@me/relationships.ts
@@ -157,7 +157,7 @@ async function updateRelationship(
 		select: userProjection,
 	});
 
-	var relationship = user.relationships.find((x) => x.to_id === id);
+	let relationship = user.relationships.find((x) => x.to_id === id);
 	const friendRequest = friend.relationships.find(
 		(x) => x.to_id === req.user_id,
 	);
@@ -201,13 +201,13 @@ async function updateRelationship(
 	if (user.relationships.length >= maxFriends)
 		throw DiscordApiErrors.MAXIMUM_FRIENDS.withParams(maxFriends);
 
-	var incoming_relationship = Relationship.create({
+	let incoming_relationship = Relationship.create({
 		nickname: undefined,
 		type: RelationshipType.incoming,
 		to: user,
 		from: friend,
 	});
-	var outgoing_relationship = Relationship.create({
+	let outgoing_relationship = Relationship.create({
 		nickname: undefined,
 		type: RelationshipType.outgoing,
 		to: friend,