get all posts from database