diff --git a/src/product/repository.ts b/src/product/repository.ts index c650dc8..52a3e6c 100644 --- a/src/product/repository.ts +++ b/src/product/repository.ts @@ -131,7 +131,7 @@ class ProductRepository { return products } - async deleteProductById(id: number) { + async deleteProductById(id: bigint) { try { await this.prisma.products.delete({ where: { diff --git a/src/product/schema.ts b/src/product/schema.ts index e6fd0ac..6a5189c 100644 --- a/src/product/schema.ts +++ b/src/product/schema.ts @@ -37,6 +37,7 @@ export type UpdateProductDataService = { new: string[] } } -export type FlattenUpdateProduct = Omit & { +export type FlattenUpdateProduct = Omit & { images: string[] + price: number } diff --git a/src/product/service.test.ts b/src/product/service.test.ts index 03ef5e6..856cf65 100644 --- a/src/product/service.test.ts +++ b/src/product/service.test.ts @@ -41,6 +41,7 @@ describe('product service', () => { createProduct: jest.fn(), getProductById: jest.fn(), getProducts: jest.fn(), + deleteProductById: jest.fn(), } as unknown as jest.Mocked productService = new ProductService(productRepo, logger)