Skip to content

Commit 25fb6ac

Browse files
committed
fix: error registering with email
1 parent 487daa6 commit 25fb6ac

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

backend/src/modules/user/services/user/user.service.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Inject, Injectable, forwardRef } from '@nestjs/common';
1+
import { Inject, Injectable, forwardRef, Logger } from '@nestjs/common';
22
import { Types } from 'mongoose';
33
import { ErrorTypeEnum } from 'src/modules/utility/enums/error-type.enum';
44
import { OTPTypeEnum } from 'src/modules/utility/enums/otp-type.enum';
@@ -249,14 +249,13 @@ export class UserService {
249249
}
250250
} catch (error) {}
251251

252-
this.otp = await this.otpService.findOTPByEmail(
252+
const otp = await this.otpService.findOTPByEmail(
253253
body.email,
254254
OTPTypeEnum.REGISTRATION,
255255
);
256-
257256
if (
258-
this.otp.length == 0 ||
259-
new Date(this.otp[this.otp.length - 1].expiryDate).getTime() <
257+
otp.length == 0 ||
258+
new Date(otp[otp.length - 1].expiryDate).getTime() <
260259
new Date().getTime()
261260
) {
262261
/* const StorX = await storxController.createUserAndGenerateStorXKey(

backend/src/modules/utility/services/mail.service.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,8 @@ export class MailService {
194194
return false;
195195
} */
196196

197-
const userToken = await this.getTokenWithUserEmail(email);
197+
198+
// const userToken = await this.getTokenWithUserEmail(email);
198199

199200
await this.mailerService
200201
.sendMail({
@@ -206,7 +207,7 @@ export class MailService {
206207
NodeName: process.env.NODE_NAME,
207208
NodeImageSrc: process.env.THEME_LOGO,
208209
url: url,
209-
unsubscribeEmailUrl: `${this.validateTokenUrl}${userToken}`,
210+
// unsubscribeEmailUrl: `${this.validateTokenUrl}${userToken}`,
210211
},
211212
attachments: [
212213
{

0 commit comments

Comments
 (0)