Refactored to use posts-service for $http requests