build: runtime bundle and fix agent code helper types

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-04 11:04:50 +03:30
co-authored by Cursor
parent 6257fe2770
commit 7779101fb4
3 changed files with 127 additions and 17 deletions
+4 -3
View File
File diff suppressed because one or more lines are too long
+121 -8
View File
File diff suppressed because one or more lines are too long
+2 -6
View File
@@ -8,7 +8,7 @@ import { ConfigService } from '@nestjs/config';
import { JwtService } from '@nestjs/jwt';
import { randomInt } from 'node:crypto';
import * as bcrypt from 'bcryptjs';
import { AppUserRole } from '@prisma/client';
import { AppUserRole, Customer } from '@prisma/client';
import { AgentLevelService } from '../agent/agent-level.service';
import { PrismaService } from '../prisma/prisma.service';
import { SmsService } from '../sms/sms.service';
@@ -331,11 +331,7 @@ export class AuthService {
});
}
private async ensureAgentHasReferralCode(user: {
id: string;
appRole: AppUserRole;
agentCode: string | null;
}) {
private async ensureAgentHasReferralCode(user: Customer): Promise<Customer> {
if (user.appRole !== AppUserRole.agent || user.agentCode?.trim()) {
return user;
}