MCPcopy Create free account
hub / github.com/TryCatchLearn/Restore-v2 / GetBasket

Method GetBasket

API/Controllers/BasketController.cs:15–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13 DiscountService couponService, PaymentsService paymentsService) : BaseApiController
14{
15 [HttpGet]
16 public async Task<ActionResult<BasketDto>> GetBasket()
17 {
18 var basket = await RetrieveBasket();
19
20 if (basket == null) return NoContent();
21
22 return basket.ToDto();
23 }
24
25 [HttpPost]
26 public async Task<ActionResult<BasketDto>> AddItemToBasket(int productId, int quantity)

Callers

nothing calls this directly

Calls 1

ToDtoMethod · 0.45

Tested by

no test coverage detected