From d3e271bed37019de8beec4d81e7aa2358d5a8852 Mon Sep 17 00:00:00 2001 From: nfesta2023 <142601504+nfesta2023@users.noreply.github.com> Date: Thu, 25 Jan 2024 12:44:26 +0700 Subject: [PATCH] comment to fix auto merge issue (#43) Co-authored-by: NHT --- src/feature/cart/cart.controller.ts | 10 +++++----- src/feature/cart/cart.service.ts | 21 +++++++++++---------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/feature/cart/cart.controller.ts b/src/feature/cart/cart.controller.ts index eddb5af..64fb8c3 100644 --- a/src/feature/cart/cart.controller.ts +++ b/src/feature/cart/cart.controller.ts @@ -59,7 +59,7 @@ export class CartController { } return res; } - } + } // end of addCartItem @MessagePattern({ cmd: 'get_cart_detail' }) async getCartDetail(customer_id: number): Promise { @@ -90,7 +90,7 @@ export class CartController { return res; } - } + } // end of getCartDetail @MessagePattern({ cmd: 'update_cart_advanced' }) async updateCartAdvanced( @@ -140,7 +140,7 @@ export class CartController { return res; } - } + } // end of updateCartAdvanced @MessagePattern({ cmd: 'update_cart_basic' }) async updateCartBasic( @@ -175,7 +175,7 @@ export class CartController { return res; } - } + } // end of updateCartBasic @MessagePattern({ cmd: 'delete_all_cart_item' }) async deleteAllCartItem(customer_id: number): Promise { @@ -200,5 +200,5 @@ export class CartController { return res; } - } + } // end of deleteAllCartItem } diff --git a/src/feature/cart/cart.service.ts b/src/feature/cart/cart.service.ts index 85cdd78..17f60a5 100644 --- a/src/feature/cart/cart.service.ts +++ b/src/feature/cart/cart.service.ts @@ -158,7 +158,7 @@ export class CartService { ); return await this.getCart(customer_id); } - } + } // end of addCartItem async getCart(customer_id: number): Promise { if (this.flagService.isFeatureEnabled('fes-24-add-to-cart')) { @@ -167,7 +167,7 @@ export class CartService { .where('cart.customer_id = :customer_id', { customer_id }) .getMany(); } - } + } // end of getCart async insertCart( customer_id: number, @@ -200,7 +200,7 @@ export class CartService { }) .execute(); } - } + } // end of insertCart async updateCart( item_id: number, @@ -234,7 +234,7 @@ export class CartService { .where('item_id = :item_id', { item_id }) .execute(); } - } + } // end of updateCart async updateCartAdvancedFromEndPoint( customer_id: number, @@ -449,7 +449,8 @@ export class CartService { return await this.getCart(customer_id); } - } + } // end of updateCartAdvancedFromEndPoint + async getCartByItemId(item_ids: number[], customer_id) { if (this.flagService.isFeatureEnabled('fes-28-update-cart')) { return await this.entityManager @@ -458,7 +459,7 @@ export class CartService { .andWhere('cart.item_id IN (:...item_ids)', { item_ids }) .getMany(); } - } + } // end of getCartByItemId async massUpdateCartItem(cart_items: CartItem[]): Promise { //Only do the mass updating if the udated sku has the same as the sku of the current item @@ -509,7 +510,7 @@ export class CartService { }, ); } - } + } // end of massUpdateCartItem async updateCartBasicFromEndPoint( customer_id: number, @@ -551,7 +552,7 @@ export class CartService { return await this.getCart(customer_id); } - } + } // end of updateCartBasicFromEndPoint async massUpdateCartItemWithQuantity( items: QuantityUpdatedItem[], @@ -572,7 +573,7 @@ export class CartService { }, ); } - } + } //end of massUpdateCartItemWithQuantity async deleteAllCartItem(customer_id: number) { if (this.flagService.isFeatureEnabled('fes-36-delete-whole-cart')) { @@ -583,5 +584,5 @@ export class CartService { .where('customer_id = :customer_id', { customer_id }) .execute(); } - } + } // end of deleteAllCartItem }