From b2fa2f7d8ac28a12947104144407281615d35dc1 Mon Sep 17 00:00:00 2001 From: Sreeraj Rajendran Nair <32698303+sreeraj-r-nair@users.noreply.github.com> Date: Wed, 7 Sep 2022 11:06:07 +0200 Subject: [PATCH] removing batch info from the url (#116) * removing batch info from the url * small CR changes Co-authored-by: Sreeraj Rajendran Nair --- src/datasources/product-api.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/datasources/product-api.ts b/src/datasources/product-api.ts index 8415a1b..c05e668 100644 --- a/src/datasources/product-api.ts +++ b/src/datasources/product-api.ts @@ -393,7 +393,7 @@ export class ProductAPI extends BaseSQLDataSource { /** * @function addProduct - * @description Adds a new product to system, will use batchname and name to + * @description Adds a new product to system, will use name to * set a unique path, artNo is the productId with e infront. */ async addProduct( @@ -402,8 +402,7 @@ export class ProductAPI extends BaseSQLDataSource { designerId: number, ): Promise { const fixedBatch = !!batch ? batch : ''; - const path = batch ? fixedBatch + ' ' + name : name; - const productPath = slug(path); + const productPath = slug(name); const safePath = await this.getUniqueProductPath(productPath, null); const idres = await this.knex