chore: Syncs changes that were erroneously made in enterprise repo (#1949)

This commit is contained in:
Tom Moor
2021-03-10 14:56:34 -08:00
committed by GitHub
parent d530edcc2f
commit dc967be4fc
9 changed files with 34 additions and 11 deletions

View File

@ -69,7 +69,15 @@ export async function getUserForEmailSigninToken(token: string): Promise<User> {
}
}
const user = await User.findByPk(payload.id);
const user = await User.findByPk(payload.id, {
include: [
{
model: Team,
as: "team",
required: true,
},
],
});
// if user has signed in at all since the token was created then
// it's no longer valid, they'll need a new one.