working with links
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user