Exemple #1
0
        public async Task OnGetAsync()
        {
            Bookmarks = await _context.GetPublicBookmarksAsync();

            string githubId = null;

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

            if (githubId == null)
            {
                ClippyMode = false;
            }
            else
            {
                User user = await _context.GetUserByGithubId(githubId);

                ClippyMode = user.ClippyMode;
            }
        }