wip making UI actions for notes

This commit is contained in:
Ryan Peters
2025-07-17 16:42:25 -04:00
parent 11f468a5c1
commit 14e56285f5
7 changed files with 55 additions and 30 deletions

View File

@@ -25,7 +25,15 @@ public class NoteController : Controller
return View(model);
}
[Route("{noteName}/delete")]
[HttpPost, Route("create")]
public IActionResult Create(string noteName)
{
noteService.SaveNote(noteName);
return Redirect($"/{noteName}");
}
[Route("delete/{noteName}")]
public IActionResult Delete(string noteName)
{
noteService.DeleteNote(noteName);