added controller function for deleting blogposts