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)); }
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); }