mirror of
https://github.com/ershisan99/flashcards-api.git
synced 2025-12-24 20:59:28 +00:00
remove console logs
This commit is contained in:
@@ -21,8 +21,6 @@ export class AuthService {
|
||||
const refreshToken = jwt.sign(payload, refreshSecretKey, {
|
||||
expiresIn: '30d',
|
||||
})
|
||||
console.log(refreshToken.length)
|
||||
// Save refresh token in the database
|
||||
await this.prisma.refreshToken.create({
|
||||
data: {
|
||||
userId: userId,
|
||||
|
||||
@@ -6,14 +6,13 @@ import { AppSettings } from '../../../settings/app-settings'
|
||||
import { Request } from 'express'
|
||||
|
||||
const cookieExtractor = function (req: Request) {
|
||||
console.log(req.cookies)
|
||||
let token = null
|
||||
if (req && req.cookies) {
|
||||
token = req.cookies['refreshToken']
|
||||
}
|
||||
console.log(token)
|
||||
return token
|
||||
}
|
||||
|
||||
// ...
|
||||
@Injectable()
|
||||
export class JwtRefreshStrategy extends PassportStrategy(Strategy, 'jwt-refresh') {
|
||||
|
||||
@@ -18,10 +18,11 @@ export class ResendVerificationEmailHandler
|
||||
|
||||
async execute(command: ResendVerificationEmailCommand) {
|
||||
const user = await this.usersRepository.findUserById(command.userId)
|
||||
console.log(user)
|
||||
|
||||
if (!user) {
|
||||
throw new NotFoundException('User not found')
|
||||
}
|
||||
|
||||
if (user.isEmailVerified) {
|
||||
throw new BadRequestException('Email has already been verified')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user