Пример #1
0
        public ActionResult Clear(int userId)
        {
            var identityName = User?.Identity?.Name;

            if (identityName != "*****@*****.**")
            {
                throw new Exception($"Not authorized for user {identityName}");
            }

            _WorkoutService.ClearSets(userId);
            return(RedirectToAction(nameof(Set), new { UserId = userId }));
        }