Notes/Controllers/NoteController.cs
2023-05-10 16:22:51 -04:00

24 lines
485 B
C#

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