Trains management CRUD issues solved

This commit is contained in:
hagiye
2026-06-05 21:07:04 +03:00
parent 9676a6bb56
commit dc42838a43
41 changed files with 2192 additions and 1830 deletions

View File

@@ -7,6 +7,7 @@ import {
ParseUUIDPipe,
Patch,
Post,
Query,
} from '@nestjs/common';
import { ApiOperation, ApiTags } from '@nestjs/swagger';
import { CreateWagonDto } from './dto/create-wagon.dto';
@@ -28,8 +29,8 @@ export class WagonsController {
@Get()
@ApiOperation({ summary: 'List all wagons' })
findAll() {
return this.wagonsService.findAll();
findAll(@Query() query: Record<string, string | undefined>) {
return this.wagonsService.findAll(query);
}
@Get(':id')
@@ -73,4 +74,4 @@ export class TrainWagonsReorderController {
reorder(@Param('trainId', ParseUUIDPipe) trainId: string, @Body() dto: ReorderWagonsDto) {
return this.wagonsService.reorderWagons(trainId, dto);
}
}
}