working with links

This commit is contained in:
2023-05-12 12:38:13 -04:00
parent 77e6ed78fd
commit 16f4dc9a76
15 changed files with 64 additions and 78 deletions

View File

@ -1,4 +1,5 @@
using BinaryDad.Notes.Services;
using BinaryDad.Notes.Models;
using BinaryDad.Notes.Services;
using Microsoft.AspNetCore.Mvc;
namespace BinaryDad.Notes.Controllers;
@ -15,8 +16,12 @@ public class HomeController : Controller
[Route("{noteName?}")]
public IActionResult Index(string? noteName)
{
var content = noteService.Get(noteName);
var model = new ContentModel
{
Text = noteService.GetText(noteName),
NoteNames = noteService.GetNoteNames()
};
return View((object)content);
return View(model);
}
}