feat: add renew token query for apollo client (chrome-extension) (#5200)

fixes - #5203
This commit is contained in:
Aditya Pimpalkar
2024-05-16 09:21:16 +01:00
committed by GitHub
parent 6bde0ae258
commit ea5a7ba70e
7 changed files with 150 additions and 72 deletions

View File

@ -422,8 +422,9 @@ export class TokenService {
assert(token, "This refresh token doesn't exist", NotFoundException);
const user = await this.userRepository.findOneBy({
id: jwtPayload.sub,
const user = await this.userRepository.findOne({
where: { id: jwtPayload.sub },
relations: ['appTokens'],
});
assert(user, 'User not found', NotFoundException);