public async Task OnGetAsync(string query) { string githubId = null; foreach (Claim claim in User.Claims) { if (claim.Type == ClaimTypes.NameIdentifier) { githubId = claim.Value; } } int id; if (githubId == null) { ClippyMode = false; id = 0; } else { User user = await _context.GetUserByGithubId(githubId); ClippyMode = user.ClippyMode; id = user.Id; } Bookmarks = await _context.GetBookmarksBySearch(query, id); Query = query; }