diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2023-01-20 18:10:47 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-20 18:10:47 +1100 |
commit | 71082eb918f055f07fa45cd44c90fcb0c8dd6a29 (patch) | |
tree | 34fe911abebb5e954b1fd5de57d8ed00d7304121 /src/api/routes/users/#id/relationships.ts | |
parent | fix: route file regex (#956) (diff) | |
download | server-71082eb918f055f07fa45cd44c90fcb0c8dd6a29.tar.xz |
Add ESLint (#941)
* Add eslint, switch to lint-staged for precommit * Fix all ESLint errors * Update GH workflow to check prettier and eslint
Diffstat (limited to 'src/api/routes/users/#id/relationships.ts')
-rw-r--r-- | src/api/routes/users/#id/relationships.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/api/routes/users/#id/relationships.ts b/src/api/routes/users/#id/relationships.ts index aa36967a..e915e3ff 100644 --- a/src/api/routes/users/#id/relationships.ts +++ b/src/api/routes/users/#id/relationships.ts @@ -36,7 +36,7 @@ router.get( "/", route({ test: { response: { body: "UserRelationsResponse" } } }), async (req: Request, res: Response) => { - var mutual_relations: object[] = []; + const mutual_relations: object[] = []; const requested_relations = await User.findOneOrFail({ where: { id: req.params.id }, relations: ["relationships"], @@ -53,7 +53,7 @@ router.get( rmem.type === 1 && rmem.to_id !== req.user_id ) { - var relation_user = await User.getPublicUser(rmem.to_id); + const relation_user = await User.getPublicUser(rmem.to_id); mutual_relations.push({ id: relation_user.id, |