fix(platform): resolve master compile errors blocking load test (GOO-171)
- listings index.ts now re-exports PROPERTY_REPOSITORY/IPropertyRepository
and MEDIA_STORAGE_SERVICE/IMediaStorageService/MinioMediaStorageService
(documents module depends on these)
- add PropertyDocument model + DocumentType + DocumentVerificationStatus
enums to Prisma schema and create companion migration
- add TooManyRequestsException to shared domain exceptions
- add RL_SENSITIVE_WRITE preset to endpoint-rate-limit decorator and
re-export from shared/infrastructure
- add certificateVerified to PropertyExtras + Create/UpdateListingDto so
listings.controller line 135/341 type-check
- create PhoneLoginOtpRequestedEvent + matching notifications listener
(notifications.module already imports the listener)
- oauth.service constructs UserEntity with deletedAt: null
- web: fix LegalStatus fixtures ('Sổ hồng' -> 'SO_HONG'), make
ListingDetail.property.certificateVerified optional so existing fixtures
compile, type admin layout auth-store mock to accept null user
Verified: `pnpm typecheck` green across @goodgo/api, @goodgo/web,
@goodgo/mcp-servers; `pnpm --filter @goodgo/api build` succeeds.
Unblocks [GOO-137](/GOO/issues/GOO-137) load test.
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -44,7 +44,14 @@ vi.mock('@/components/ui/language-switcher', () => ({
|
||||
}));
|
||||
|
||||
const mockLogout = vi.fn();
|
||||
const mockAuthStore = vi.fn(() => ({
|
||||
type AuthUser = { id: string; fullName: string; role: string; email: string } | null;
|
||||
type AuthState = {
|
||||
user: AuthUser;
|
||||
isAuthenticated: boolean;
|
||||
isInitialized: boolean;
|
||||
logout: typeof mockLogout;
|
||||
};
|
||||
const mockAuthStore = vi.fn((): AuthState => ({
|
||||
user: { id: '1', fullName: 'Admin User', role: 'ADMIN', email: 'admin@goodgo.vn' },
|
||||
isAuthenticated: true,
|
||||
isInitialized: true,
|
||||
@@ -52,7 +59,7 @@ const mockAuthStore = vi.fn(() => ({
|
||||
}));
|
||||
|
||||
vi.mock('@/lib/auth-store', () => ({
|
||||
useAuthStore: (...args: unknown[]) => mockAuthStore(...args),
|
||||
useAuthStore: (...args: unknown[]) => (mockAuthStore as unknown as (...a: unknown[]) => AuthState)(...args),
|
||||
}));
|
||||
|
||||
vi.mock('@/lib/utils', () => ({
|
||||
|
||||
Reference in New Issue
Block a user