예제 #1
0
        public async Task <IActionResult> OnGet(int?clickTimeFrame)
        {
            if (clickTimeFrame.HasValue && clickTimeFrame < -90)
            {
                clickTimeFrame = -90;
            }

            ClickTimeFrame = clickTimeFrame ?? -30;

            var user = await _userManager.GetUserAsync(User);

            if (user == null)
            {
                return(NotFound($"Error: Unable to load user with ID '{_userManager.GetUserId(User)}'."));
            }

            ShortenedUrls = await _urlShortenerService.GetShortenedUrlsByUserId(user.Id);

            return(Page());
        }