Change the logic to getAllPost