added authentication, adjusted controller names

This commit is contained in:
Ryan Peters
2023-05-10 16:22:51 -04:00
parent 7657169e1e
commit 89a8b1a28b
7 changed files with 92 additions and 5 deletions

View File

@ -0,0 +1,23 @@
using BinaryDad.Notes.Services;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace BinaryDad.Notes.Controllers;
[Authorize]
public class NoteController : Controller
{
private readonly INoteService noteService;
public NoteController(INoteService noteService)
{
this.noteService = noteService;
}
public IActionResult Index()
{
var content = noteService.Get();
return View((object)content);
}
}