fix: mock 模式检查同时看 NODE_ENV 和 AI_PROVIDER
Some checks failed
Deploy API Server / build-and-deploy (push) Failing after 10m5s

This commit is contained in:
WangDL 2026-05-09 19:49:50 +08:00
parent 7e308b01cc
commit be29a11a54

View File

@ -135,7 +135,9 @@ export class AuthService {
} }
private isMockMode(): boolean { private isMockMode(): boolean {
return this.configService.get<string>('app.nodeEnv') !== 'production'; const env = this.configService.get<string>('app.nodeEnv');
const aiProvider = this.configService.get<string>('ai.provider');
return env !== 'production' || aiProvider === 'mock';
} }
private verifyMockApple(identityToken: string, email?: string | null): string { private verifyMockApple(identityToken: string, email?: string | null): string {