build: runtime bundle and fix agent code helper types
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+4
-3
File diff suppressed because one or more lines are too long
+121
-8
File diff suppressed because one or more lines are too long
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user