NA

Size: a a a
NA

AK
AK
SФ
AB
AB
D
V
${ environment.apiEndpoint}/auth/validate-reset-password-token,@Post('validate-reset-password-token')
async validateResetPasswordToken (
@Body() validateToken: ValidateToken, @Res() res
) {
try {
this.logger.debug(validateToken.token)
const token = validateToken.token
this.logger.debug('token '+ token)
const isValid = await this.authService.validateToken(token)
this.logger.debug('result '+isValid)
if(isValid) {
res.json({isValid: true})
res.redirect(`${this.frontendURL}/set-new-password?token=${token}`)
} else {
res.redirect(`${this.frontendURL}`)
}
} catch (e) {
this.logger.debug(e)
return res.status(e.getStatus()).json(e)
}
}
получаю ошибку Bad request. Unexpected token e in JSON at position 0СМ
${ environment.apiEndpoint}/auth/validate-reset-password-token,@Post('validate-reset-password-token')
async validateResetPasswordToken (
@Body() validateToken: ValidateToken, @Res() res
) {
try {
this.logger.debug(validateToken.token)
const token = validateToken.token
this.logger.debug('token '+ token)
const isValid = await this.authService.validateToken(token)
this.logger.debug('result '+isValid)
if(isValid) {
res.json({isValid: true})
res.redirect(`${this.frontendURL}/set-new-password?token=${token}`)
} else {
res.redirect(`${this.frontendURL}`)
}
} catch (e) {
this.logger.debug(e)
return res.status(e.getStatus()).json(e)
}
}
получаю ошибку Bad request. Unexpected token e in JSON at position 0V
G
V
S
S
G
G
СМ
СМ
СМ
СМ