fix(api): resolve NestJS DI + ValidationPipe bugs from type-only imports
- Remove `type` modifier from imports used as DI constructor params across ~235 files (@Injectable, @Controller, @Module, @Catch, @CommandHandler, @QueryHandler, @EventsHandler, @WebSocketGateway). TypeScript emitDecoratorMetadata strips type-only imports, leaving Reflect.metadata with Function placeholder and breaking Nest DI. - Fix controllers: DTOs used with @Body/@Query/@Param must be runtime imports so ValidationPipe can whitelist properties. Previously returned 400 "property X should not exist" on every request. - Register ProjectsModule in AppModule (was defined but never wired). - Add approve()/reject() methods to TransferListingEntity referenced by ModerateTransferListingHandler. - Export BankTransferConfirmedEvent from payments barrel for subscription activation handler. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { InjectMetric } from '@willsoto/nestjs-prometheus';
|
||||
import { type Counter, type Gauge, type Histogram } from 'prom-client';
|
||||
import { Counter, Gauge, Histogram } from 'prom-client';
|
||||
import {
|
||||
GOODGO_LISTINGS_CREATED_TOTAL,
|
||||
GOODGO_PAYMENTS_PROCESSED_TOTAL,
|
||||
|
||||
@@ -7,8 +7,8 @@ import {
|
||||
Logger,
|
||||
} from '@nestjs/common';
|
||||
import { ApiTags, ApiOperation, ApiResponse } from '@nestjs/swagger';
|
||||
import { type MetricsService } from '../../infrastructure/metrics.service';
|
||||
import { type WebVitalsBatchDto } from '../dto/web-vitals.dto';
|
||||
import { MetricsService } from '../../infrastructure/metrics.service';
|
||||
import { WebVitalsBatchDto } from '../dto/web-vitals.dto';
|
||||
|
||||
/**
|
||||
* Public endpoint for receiving Core Web Vitals from the frontend.
|
||||
|
||||
Reference in New Issue
Block a user