feed -> news; - api/

This commit is contained in:
tmshv committed 2015-03-01 02:59:49 +03:00
1 parent 22edc3b275
commit 02906582ac
5 files changed
+7 -7

No files matched your search

+2 -2
View File
@@ -5,8 +5,8 @@
module.exports = function(app) {
app.factory("api", function ($http) {
var api = {};
var Endpoint = require("./feed");
api.feed = new Endpoint($http);
var Endpoint = require("./news");
api.news = new Endpoint($http);
return api;
});
+2 -2
View File
@@ -6,8 +6,8 @@ function APIFeed(http){
this.request = http;
}
APIFeed.prototype.post = function() {
return this.request.get("/api/feed");
APIFeed.prototype.feed = function() {
return this.request.get("/news");
};
module.exports = APIFeed;
+1 -1
View File
@@ -39,7 +39,7 @@ module.exports = function(app) {
}
},
controller: function($scope, api){
api.feed.post()
api.news.feed()
.success(function (list) {
$scope.feed = list.map(function (post) {
var author_id = personByInstagram(team.team, post.data.user.username);