Updated the posts controller