Exemple #1
0
        public async Task <IActionResult> List()
        {
            ViewData["Title"] = "Your Notes";

            _logger.LogWarning($"Getting note list for user '{User.Identity.Name}'");

            List <NoteSummary> notes = await _noteStorageService.GetNoteList(User.Identity.Name);

            return(View(notes));
        }
Exemple #2
0
        public ActionResult <List <NoteSummary> > GetAll(string username)
        {
            if (string.IsNullOrWhiteSpace(username))
            {
                return(BadRequest("Username is required"));
            }

            _logger.LogWarning($"Getting note list for user '{username}'");

            List <NoteSummary> notes = _noteStorageService.GetNoteList(username);

            return(notes);
        }