chore: update referral logic

This commit is contained in:
mahyargdz
2025-04-15 15:50:31 +03:30
parent bd4d9dbf0d
commit fb8f16deb4
19 changed files with 234 additions and 262 deletions
+1 -6
View File
@@ -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);