public function changeQuantity(Request $request)
 {
     // verify parameters
     if (!$request->has("itemId") || !$request->has("quantity")) {
         return new Response("Request must contain itemId and quantity", Response::HTTP_BAD_REQUEST);
     }
     $itemId = $request->input("itemId");
     $quantity = $request->input("quantity");
     // verify valid itemId
     $cartItem = CartItem::find($itemId);
     if (is_null($cartItem)) {
         return new Response("Item id is invalid: " . $itemId, Response::HTTP_NOT_FOUND);
     }
     $cartItem->quantity = $quantity;
     $cartItem->save();
     return $this->success(array('itemId' => $itemId, 'quantity' => $quantity));
 }