コード例 #1
0
        public ActionResult Update(Receipt receipt, [FromQuery] int staffId = 0)
        {
            string customerId = Request.Cookies["UserId"];

            if (staffId == 0 && customerId == null)
            {
                return(Unauthorized());
            }

            if (staffId != 0)
            {
                receiptService.Update(receipt, staffId);
            }
            else if (customerId != null)
            {
                receiptService.Update(receipt);
            }

            return(Ok());
        }