added deletePost function to posts.js controller