Esempio n. 1
0
 public HttpStatusCode UpdateCart([FromForm] UpdateModel model)
 {
     if (cartService.Update(model.guid, model.Id, model.Amount))
     {
         return(HttpStatusCode.OK);
     }
     return(HttpStatusCode.InternalServerError);
 }
Esempio n. 2
0
 public HttpStatusCode RemoveFromCart([FromForm] UpdateModel model)
 {
     if (cartService.Remove(model.guid, model.Id))
     {
         return(HttpStatusCode.OK);
     }
     return(HttpStatusCode.InternalServerError);
 }
Esempio n. 3
0
 public HttpStatusCode AddToCart([FromForm] UpdateModel model)
 {
     if (cartService.Add(model.guid, model.Id))
     {
         return(HttpStatusCode.OK);
     }
     return(HttpStatusCode.Conflict);
 }