add delete endpoint
This commit is contained in:
@ -24,4 +24,12 @@ public class HomeController : Controller
|
||||
|
||||
return View(model);
|
||||
}
|
||||
|
||||
[Route("{noteName}/delete")]
|
||||
public IActionResult Delete(string noteName)
|
||||
{
|
||||
noteService.DeleteNote(noteName);
|
||||
|
||||
return Redirect("/");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user