Commit 005d8adf authored by Diego Iván's avatar Diego Iván
Browse files

agregando findOne cateogory

parent 645f63a7
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -28,11 +28,11 @@ export class CategoryService {
    return await this.categoryRepository.find({ where: { language: lang }, select: ['idCategory', 'name'] });
  }

  // update(id: number, updateCategoryDto: UpdateCategoryDto) {
  //   return `This action updates a #${id} category`;
  // }

  async remove(idCategory: number) {
    await this.categoryRepository.delete({ idCategory });
  }

  async findOne(idCategory: number): Promise<Category> {
    return await this.categoryRepository.findOne({ where: { idCategory } });
  }
}