edit and delete button function, deleted post index route