Exemple #1
0
        public async Task <IActionResult> OnGetAsync(int id)
        {
            string githubId = "";

            foreach (Claim claim in User.Claims)
            {
                if (claim.Type == ClaimTypes.NameIdentifier)
                {
                    githubId = claim.Value;
                }
            }

            Users = await _context.GetUsersAsync();

            ThisUser = await _context.GetUserByGithubId(githubId);

            if (ThisUser != null)
            {
                Notifications = await _context.GetNotificationsByUser(ThisUser.Id);
            }

            return(Page());
        }