remove unused
This commit is contained in:
@@ -9,8 +9,8 @@ export class CatalogueController {
|
||||
constructor(private readonly catalogueService: CatalogueService) { }
|
||||
|
||||
@Post()
|
||||
create(@Body() createCatalogueDto: CreateCatalogueDto) {
|
||||
return this.catalogueService.create(createCatalogueDto);
|
||||
create(@Body() dto: CreateCatalogueDto) {
|
||||
return this.catalogueService.create(dto);
|
||||
}
|
||||
|
||||
@Get()
|
||||
@@ -24,8 +24,8 @@ export class CatalogueController {
|
||||
}
|
||||
|
||||
@Patch(':id')
|
||||
update(@Param('id') id: string, @Body() updateCatalogueDto: UpdateCatalogueDto) {
|
||||
return this.catalogueService.update(id, updateCatalogueDto);
|
||||
update(@Param('id') id: string, @Body() dto: UpdateCatalogueDto) {
|
||||
return this.catalogueService.update(id, dto);
|
||||
}
|
||||
|
||||
@Delete(':id')
|
||||
|
||||
@@ -22,7 +22,10 @@ export class CatalogueService {
|
||||
}
|
||||
const catalogue = this.em.create(Catalogue,
|
||||
{ ...dto, business, status: CatalogueStatus.PENDING })
|
||||
return this.em.persistAndFlush(catalogue)
|
||||
|
||||
await this.em.persistAndFlush(catalogue)
|
||||
|
||||
return catalogue
|
||||
}
|
||||
|
||||
findAll(dto: FindCataloguesDto) {
|
||||
|
||||
@@ -10,7 +10,7 @@ import { CatalogueRepository } from "../repositories/catalogue.repository";
|
||||
|
||||
@Entity({ repository: () => CatalogueRepository })
|
||||
export class Catalogue extends BaseEntity {
|
||||
@Property({ type: "varchar", length: 255, unique: true })
|
||||
@Property({ type: "varchar", length: 255})
|
||||
name!: string;
|
||||
|
||||
@Property({ type: "json" })
|
||||
|
||||
Reference in New Issue
Block a user