Skip to content

Commit

Permalink
comment to fix auto merge issue (#43)
Browse files Browse the repository at this point in the history
Co-authored-by: NHT <[email protected]>
  • Loading branch information
nfesta2023 and hoangtuan910 authored Jan 25, 2024
1 parent e68fc34 commit d3e271b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
10 changes: 5 additions & 5 deletions src/feature/cart/cart.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export class CartController {
}
return res;
}
}
} // end of addCartItem

@MessagePattern({ cmd: 'get_cart_detail' })
async getCartDetail(customer_id: number): Promise<GetCartDetailResponse> {
Expand Down Expand Up @@ -90,7 +90,7 @@ export class CartController {

return res;
}
}
} // end of getCartDetail

@MessagePattern({ cmd: 'update_cart_advanced' })
async updateCartAdvanced(
Expand Down Expand Up @@ -140,7 +140,7 @@ export class CartController {

return res;
}
}
} // end of updateCartAdvanced

@MessagePattern({ cmd: 'update_cart_basic' })
async updateCartBasic(
Expand Down Expand Up @@ -175,7 +175,7 @@ export class CartController {

return res;
}
}
} // end of updateCartBasic

@MessagePattern({ cmd: 'delete_all_cart_item' })
async deleteAllCartItem(customer_id: number): Promise<GeneralResponse> {
Expand All @@ -200,5 +200,5 @@ export class CartController {

return res;
}
}
} // end of deleteAllCartItem
}
21 changes: 11 additions & 10 deletions src/feature/cart/cart.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export class CartService {
);
return await this.getCart(customer_id);
}
}
} // end of addCartItem

async getCart(customer_id: number): Promise<CartItem[]> {
if (this.flagService.isFeatureEnabled('fes-24-add-to-cart')) {
Expand All @@ -167,7 +167,7 @@ export class CartService {
.where('cart.customer_id = :customer_id', { customer_id })
.getMany();
}
}
} // end of getCart

async insertCart(
customer_id: number,
Expand Down Expand Up @@ -200,7 +200,7 @@ export class CartService {
})
.execute();
}
}
} // end of insertCart

async updateCart(
item_id: number,
Expand Down Expand Up @@ -234,7 +234,7 @@ export class CartService {
.where('item_id = :item_id', { item_id })
.execute();
}
}
} // end of updateCart

async updateCartAdvancedFromEndPoint(
customer_id: number,
Expand Down Expand Up @@ -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
Expand All @@ -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<void> {
//Only do the mass updating if the udated sku has the same as the sku of the current item
Expand Down Expand Up @@ -509,7 +510,7 @@ export class CartService {
},
);
}
}
} // end of massUpdateCartItem

async updateCartBasicFromEndPoint(
customer_id: number,
Expand Down Expand Up @@ -551,7 +552,7 @@ export class CartService {

return await this.getCart(customer_id);
}
}
} // end of updateCartBasicFromEndPoint

async massUpdateCartItemWithQuantity(
items: QuantityUpdatedItem[],
Expand All @@ -572,7 +573,7 @@ export class CartService {
},
);
}
}
} //end of massUpdateCartItemWithQuantity

async deleteAllCartItem(customer_id: number) {
if (this.flagService.isFeatureEnabled('fes-36-delete-whole-cart')) {
Expand All @@ -583,5 +584,5 @@ export class CartService {
.where('customer_id = :customer_id', { customer_id })
.execute();
}
}
} // end of deleteAllCartItem
}

0 comments on commit d3e271b

Please sign in to comment.