|
@@ -3,6 +3,7 @@ import {
|
|
|
Controller,
|
|
Controller,
|
|
|
Delete,
|
|
Delete,
|
|
|
Get,
|
|
Get,
|
|
|
|
|
+ Param,
|
|
|
Post,
|
|
Post,
|
|
|
Put,
|
|
Put,
|
|
|
Query,
|
|
Query,
|
|
@@ -78,7 +79,7 @@ export class CarousalController {
|
|
|
@ApiOkResponse({
|
|
@ApiOkResponse({
|
|
|
type: CarousalVo,
|
|
type: CarousalVo,
|
|
|
})
|
|
})
|
|
|
- async get(id: string) {
|
|
|
|
|
|
|
+ async get(@Param('id') id: string) {
|
|
|
return CarousalMapper.toVo(await this.carousalService.get(id));
|
|
return CarousalMapper.toVo(await this.carousalService.get(id));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -87,7 +88,10 @@ export class CarousalController {
|
|
|
@ApiOkResponse({
|
|
@ApiOkResponse({
|
|
|
type: CarousalVo,
|
|
type: CarousalVo,
|
|
|
})
|
|
})
|
|
|
- async update(id: string, updateCarousalRequest: UpdateCarousalRequest) {
|
|
|
|
|
|
|
+ async update(
|
|
|
|
|
+ @Param('id') id: string,
|
|
|
|
|
+ @Body() updateCarousalRequest: UpdateCarousalRequest,
|
|
|
|
|
+ ) {
|
|
|
return CarousalMapper.toVo(
|
|
return CarousalMapper.toVo(
|
|
|
await this.carousalService.update(id, updateCarousalRequest),
|
|
await this.carousalService.update(id, updateCarousalRequest),
|
|
|
);
|
|
);
|
|
@@ -98,7 +102,7 @@ export class CarousalController {
|
|
|
@ApiOkResponse({
|
|
@ApiOkResponse({
|
|
|
type: CarousalVo,
|
|
type: CarousalVo,
|
|
|
})
|
|
})
|
|
|
- async active(id: string) {
|
|
|
|
|
|
|
+ async active(@Param('id') id: string) {
|
|
|
return CarousalMapper.toVo(await this.carousalService.active(id));
|
|
return CarousalMapper.toVo(await this.carousalService.active(id));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -107,13 +111,13 @@ export class CarousalController {
|
|
|
@ApiOkResponse({
|
|
@ApiOkResponse({
|
|
|
type: CarousalVo,
|
|
type: CarousalVo,
|
|
|
})
|
|
})
|
|
|
- async inactive(id: string) {
|
|
|
|
|
|
|
+ async inactive(@Param('id') id: string) {
|
|
|
return CarousalMapper.toVo(await this.carousalService.inactive(id));
|
|
return CarousalMapper.toVo(await this.carousalService.inactive(id));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Delete(':id')
|
|
@Delete(':id')
|
|
|
@ApiBearerAuth()
|
|
@ApiBearerAuth()
|
|
|
- async delete(id: string) {
|
|
|
|
|
|
|
+ async delete(@Param('id') id: string) {
|
|
|
await this.carousalService.delete(id);
|
|
await this.carousalService.delete(id);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|