diff --git a/api/src/routes/users/@me/index.ts b/api/src/routes/users/@me/index.ts
index 7fc20457..92499689 100644
--- a/api/src/routes/users/@me/index.ts
+++ b/api/src/routes/users/@me/index.ts
@@ -57,7 +57,7 @@ router.patch("/", route({ body: "UserModifySchema" }), async (req: Request, res:
}
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: { code: "BASE_TYPE_REQUIRED", message: req.t("common:field.BASE_TYPE_REQUIRED") }
diff --git a/api/src/routes/users/@me/relationships.ts b/api/src/routes/users/@me/relationships.ts
index 0c13cdba..d03014b6 100644
--- a/api/src/routes/users/@me/relationships.ts
+++ b/api/src/routes/users/@me/relationships.ts
@@ -129,7 +129,7 @@ async function updateRelationship(req: Request, res: Response, friend: User, typ
{ relations: ["relationships", "relationships.to"], 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);
// TODO: you can add infinitely many blocked users (should this be prevented?)
@@ -165,8 +165,8 @@ async function updateRelationship(req: Request, res: Response, friend: User, typ
const { maxFriends } = Config.get().limits.user;
if (user.relationships.length >= maxFriends) throw DiscordApiErrors.MAXIMUM_FRIENDS.withParams(maxFriends);
- var incoming_relationship = new Relationship({ nickname: undefined, type: RelationshipType.incoming, to: user, from: friend });
- var outgoing_relationship = new Relationship({
+ let incoming_relationship = new Relationship({ nickname: undefined, type: RelationshipType.incoming, to: user, from: friend });
+ let outgoing_relationship = new Relationship({
nickname: undefined,
type: RelationshipType.outgoing,
to: friend,
|