added authentication, adjusted controller names
This commit is contained in:
23
Controllers/NoteController.cs
Normal file
23
Controllers/NoteController.cs
Normal 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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user