Beispiel #1
0
        public IActionResult CheckOut(string userName)
        {
            IActionResult result = NoContent();

            var existingVisit = _db.GetCurrentVisit(userName);

            if (existingVisit == null)
            {
                result = NotFound();
            }
            else
            {
                existingVisit.CheckOut = DateTime.UtcNow;
                _db.UpdateVisit(existingVisit);
                result = Ok();
            }
            return(result);
        }