diff --git a/backend/src/abstracts/product.abstract.ts b/backend/src/abstracts/product.abstract.ts index 3f29ad9..5c09f95 100644 --- a/backend/src/abstracts/product.abstract.ts +++ b/backend/src/abstracts/product.abstract.ts @@ -27,7 +27,8 @@ abstract class ProductProvider { gender: string, category: string, price: number, - imageUrl: string + imageUrl: string, + url: string ): Promise; abstract deleteProduct(id: string): Promise; diff --git a/backend/src/controllers/product.controller.ts b/backend/src/controllers/product.controller.ts index 9af12be..b86466c 100644 --- a/backend/src/controllers/product.controller.ts +++ b/backend/src/controllers/product.controller.ts @@ -45,7 +45,8 @@ class ProductController { req.body.gender, req.body.category, req.body.price, - req.body.imageUrl + req.body.imageUrl, + req.body.url ); return res.status(201).json(newProduct); } catch (e) { diff --git a/backend/src/services/product.service.ts b/backend/src/services/product.service.ts index 7adba95..bec1557 100644 --- a/backend/src/services/product.service.ts +++ b/backend/src/services/product.service.ts @@ -21,7 +21,8 @@ class ProductService implements ProductProvider { gender: string, category: string, price: number, - imageUrl: string + imageUrl: string, + url: string ): Promise => { if ( !title || @@ -31,7 +32,8 @@ class ProductService implements ProductProvider { !gender || !category || !price || - !imageUrl + !imageUrl || + !url ) { throw new HttpBadRequestError(); } @@ -43,7 +45,8 @@ class ProductService implements ProductProvider { gender, category, price, - imageUrl + imageUrl, + url ); };