Skip to content

Commit 24379b9

Browse files
committed
Fix linting errors
1 parent 63dd3e0 commit 24379b9

File tree

2 files changed

+19
-8
lines changed

2 files changed

+19
-8
lines changed

backend/typescript/rest/authRoutes.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,15 @@ authRouter.post(
5858
try {
5959
if (isAuthorizedByEmail(req.body.email)) {
6060
const user = await userService.getUserByEmail(req.body.email);
61-
61+
6262
const activatedUser = user;
6363
activatedUser.status = UserStatus.ACTIVE;
6464
await userService.updateUserById(user.id, activatedUser);
6565

66-
const rest = { ...{ accessToken: req.body.accessToken }, ...activatedUser };
66+
const rest = {
67+
...{ accessToken: req.body.accessToken },
68+
...activatedUser,
69+
};
6770
res
6871
.cookie("refreshToken", req.body.refreshToken, cookieOptions)
6972
.status(200)

frontend/src/APIClients/UserAPIClient.ts

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ const get = async (): Promise<User[]> => {
1414
});
1515
return data;
1616
} catch (error) {
17-
throw new Error(`Failed to get users. ${error instanceof Error ? error.message : "Unknown error occured."}`);
17+
throw new Error(
18+
`Failed to get users. ${
19+
error instanceof Error ? error.message : "Unknown error occured."
20+
}`,
21+
);
1822
}
1923
};
2024

@@ -39,12 +43,16 @@ const invite = async (email: string): Promise<void> => {
3943
"accessToken",
4044
)}`;
4145
try {
42-
await baseAPIClient.post("/auth/invite-user", { email }, {
43-
headers: { Authorization: bearerToken },
44-
});
46+
await baseAPIClient.post(
47+
"/auth/invite-user",
48+
{ email },
49+
{
50+
headers: { Authorization: bearerToken },
51+
},
52+
);
4553
} catch (error) {
46-
throw new Error(`Failed to invite user with email '${email}'`)
54+
throw new Error(`Failed to invite user with email '${email}'`);
4755
}
48-
}
56+
};
4957

5058
export default { get, create, invite };

0 commit comments

Comments
 (0)