add delete endpoint

This commit is contained in:
2023-05-12 12:47:54 -04:00
parent b60a246c34
commit faaa0dba8f
3 changed files with 16 additions and 0 deletions

View File

@ -24,4 +24,12 @@ public class HomeController : Controller
return View(model);
}
[Route("{noteName}/delete")]
public IActionResult Delete(string noteName)
{
noteService.DeleteNote(noteName);
return Redirect("/");
}
}