2023-01-05 15:32:21 +00:00
|
|
|
|
using BinaryDad.Notes.Services;
|
2023-05-10 20:22:51 +00:00
|
|
|
|
using Microsoft.AspNetCore.Authorization;
|
2023-01-05 15:32:21 +00:00
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
2022-11-29 15:14:15 +00:00
|
|
|
|
|
|
|
|
|
namespace BinaryDad.Notes.Controllers;
|
|
|
|
|
|
2023-05-10 20:22:51 +00:00
|
|
|
|
[Authorize]
|
|
|
|
|
public class NoteController : Controller
|
2022-11-29 15:14:15 +00:00
|
|
|
|
{
|
2023-01-05 15:32:21 +00:00
|
|
|
|
private readonly INoteService noteService;
|
2022-11-29 15:14:15 +00:00
|
|
|
|
|
2023-07-28 18:52:53 +00:00
|
|
|
|
public NoteController(INoteService noteService) => this.noteService = noteService;
|
2022-11-29 15:14:15 +00:00
|
|
|
|
|
|
|
|
|
public IActionResult Index()
|
|
|
|
|
{
|
2023-01-05 15:32:21 +00:00
|
|
|
|
var content = noteService.Get();
|
2022-11-29 15:14:15 +00:00
|
|
|
|
|
|
|
|
|
return View((object)content);
|
|
|
|
|
}
|
|
|
|
|
}
|