add console log to getPosts resolve to debug