feat(api): add reviews module with CRUD endpoints and CQRS
Implement polymorphic reviews system supporting any target type (agent, property, etc.) with DDD/CQRS architecture following existing patterns. Endpoints: - POST /api/reviews — create review (authenticated) - GET /api/reviews?targetType=&targetId= — list reviews by target - GET /api/reviews/stats?targetType=&targetId= — aggregate rating stats - GET /api/reviews/me — list authenticated user's reviews - DELETE /api/reviews/:id — delete own review Business rules: 1-5 rating validation, self-review prevention, one review per user per target. Includes 15 unit tests for all handlers. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -11,6 +11,7 @@ import { McpIntegrationModule } from '@modules/mcp';
|
||||
import { HttpMetricsInterceptor, MetricsModule } from '@modules/metrics';
|
||||
import { NotificationsModule } from '@modules/notifications';
|
||||
import { PaymentsModule } from '@modules/payments';
|
||||
import { ReviewsModule } from '@modules/reviews';
|
||||
import { SearchModule } from '@modules/search';
|
||||
import { SharedModule } from '@modules/shared';
|
||||
import { ThrottlerBehindProxyGuard } from '@modules/shared/infrastructure/guards/throttler-behind-proxy.guard';
|
||||
@@ -26,6 +27,7 @@ import { AppController } from './app.controller';
|
||||
SharedModule,
|
||||
AuthModule,
|
||||
ListingsModule,
|
||||
ReviewsModule,
|
||||
SearchModule,
|
||||
NotificationsModule,
|
||||
PaymentsModule,
|
||||
|
||||
Reference in New Issue
Block a user