Edit 'deletePost' function in post model