chore: update referral logic
This commit is contained in:
@@ -67,12 +67,7 @@ export class AuthService {
|
||||
const hashedPassword = await this.passwordService.hashPassword(completeRegistrationDto.password);
|
||||
const user = await this.usersService.createUser(completeRegistrationDto, hashedPassword, queryRunner);
|
||||
|
||||
if (referralCode) {
|
||||
await this.referralsService.useReferralCode({
|
||||
referralCode,
|
||||
userId: user.id,
|
||||
});
|
||||
}
|
||||
if (referralCode) await this.referralsService.useReferralCode({ referralCode, userId: user.id }, queryRunner);
|
||||
|
||||
const tokens = await this.tokensService.generateTokens(user, queryRunner);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user