mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-12 20:35:24 +00:00
11 lines
504 B
TypeScript
11 lines
504 B
TypeScript
|
|
import { IAuditService } from '@/ee/features/audit/types';
|
||
|
|
import { MockAuditService } from '@/ee/features/audit/mockAuditService';
|
||
|
|
import { AuditService } from '@/ee/features/audit/auditService';
|
||
|
|
import { env } from '@/env.mjs';
|
||
|
|
|
||
|
|
let enterpriseService: IAuditService | undefined;
|
||
|
|
|
||
|
|
export function getAuditService(): IAuditService {
|
||
|
|
enterpriseService = enterpriseService ?? (env.SOURCEBOT_EE_AUDIT_LOGGING_ENABLED === 'true' ? new AuditService() : new MockAuditService());
|
||
|
|
return enterpriseService;
|
||
|
|
}
|