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 { JwtService } from '@nestjs/jwt';
|
||||||
import { randomInt } from 'node:crypto';
|
import { randomInt } from 'node:crypto';
|
||||||
import * as bcrypt from 'bcryptjs';
|
import * as bcrypt from 'bcryptjs';
|
||||||
import { AppUserRole } from '@prisma/client';
|
import { AppUserRole, Customer } from '@prisma/client';
|
||||||
import { AgentLevelService } from '../agent/agent-level.service';
|
import { AgentLevelService } from '../agent/agent-level.service';
|
||||||
import { PrismaService } from '../prisma/prisma.service';
|
import { PrismaService } from '../prisma/prisma.service';
|
||||||
import { SmsService } from '../sms/sms.service';
|
import { SmsService } from '../sms/sms.service';
|
||||||
@@ -331,11 +331,7 @@ export class AuthService {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private async ensureAgentHasReferralCode(user: {
|
private async ensureAgentHasReferralCode(user: Customer): Promise<Customer> {
|
||||||
id: string;
|
|
||||||
appRole: AppUserRole;
|
|
||||||
agentCode: string | null;
|
|
||||||
}) {
|
|
||||||
if (user.appRole !== AppUserRole.agent || user.agentCode?.trim()) {
|
if (user.appRole !== AppUserRole.agent || user.agentCode?.trim()) {
|
||||||
return user;
|
return user;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user