Пример #1
0
        public IActionResult UseMachine(UsageItem useItem)
        {
            IActionResult result = Unauthorized();

            try
            {
                result = Ok(_db.LogEquipmentUsage(useItem));
            }
            catch (Exception)
            {
                result = BadRequest(new { Message = "Failed to log machine use" });
            }
            return(result);
        }