File size: 1,007 Bytes
97dab2a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import {
  Controller,
  Get,
  Post,
  Body,
  Patch,
  Param,
  Delete,
} from '@nestjs/common';
import { ShipperService } from './shipper.service';
import { CreateShipperDto } from '@bpm/data/dto/shipper/create-shipper.dto';
import { UpdateShipperDto } from '@bpm/data/dto/shipper/update-shipper.dto';

@Controller(['shipper', 'shippers'])
export class ShipperController {
  constructor(private readonly shipperService: ShipperService) {}

  @Post()
  create(@Body() createShipperDto: CreateShipperDto) {
    return this.shipperService.create(createShipperDto);
  }

  @Get()
  findAll() {
    return this.shipperService.findAll();
  }

  @Get(':id')
  findOne(@Param('id') id: string) {
    return this.shipperService.findOne(+id);
  }

  @Patch(':id')
  update(@Param('id') id: string, @Body() updateShipperDto: UpdateShipperDto) {
    return this.shipperService.update(+id, updateShipperDto);
  }

  @Delete(':id')
  remove(@Param('id') id: string) {
    return this.shipperService.remove(+id);
  }
}