fix: remove unnecessary type casts

This commit is contained in:
diced
2024-09-05 19:52:57 -07:00
parent e9348c127b
commit 382e4d69d6
4 changed files with 5 additions and 5 deletions

View File

@@ -117,7 +117,7 @@ export const withOAuth =
},
});
await saveSession(session, <User>user);
await saveSession(session, user);
logger.info('linked oauth account', {
provider,
@@ -147,7 +147,7 @@ export const withOAuth =
},
});
await saveSession(session, <User>user);
await saveSession(session, user);
return res.redirect('/dashboard');
} else if (existingOauth) {

View File

@@ -61,7 +61,7 @@ export default fastifyPlugin(
totp: true,
});
await saveSession(session, user as User, false);
await saveSession(session, user, false);
delete (user as any).password;

View File

@@ -47,7 +47,7 @@ export default fastifyPlugin(
});
if (!user) return res.badRequest('Invalid passkey');
await saveSession(session, <User>user);
await saveSession(session, user);
delete (user as any).password;

View File

@@ -81,7 +81,7 @@ export default fastifyPlugin(
});
const session = await getSession(req, res);
await saveSession(session, <User>user);
await saveSession(session, user);
delete (user as any).password;