David 10 anos atrás
pai
commit
32259fca1a
1 arquivos alterados com 1 adições e 41 exclusões
  1. 1 41
      front/js/app.js

+ 1 - 41
front/js/app.js

@@ -7,23 +7,6 @@ app.controller('main', function($scope,$http,$sce) {
 	$scope.keywords=[];
 	$scope.selected_kw=[];
 
-	$scope.getNews = function() {
-		$http.get("/pymnts/articles/").then(
-		function(data) {
-			/*
-			data.data=data.data.map(function(el) {
-				if (el.STATUS!="DISCONNECTED")
-					el.STATUS=el.STATUS+" "+el.ELAPSED;
-				return el;
-			});
-			*/
-			$scope.news=data.data.articles;
-		},
-		function(data){
-			console.log("error");
-			console.log(data);
-		});
-	};
 	$scope.filtered = function(q) {
 		q=q.toLowerCase();
 		return $scope.keywords.filter(function(e) { return e.toLowerCase().indexOf(q) > -1});
@@ -60,7 +43,7 @@ app.controller('main', function($scope,$http,$sce) {
 		);
 	};
 
-	$scope.getNews();
+	$scope.filter();
 	$scope.parseSource = function(source,name,sel,rss,add) {
 		url="/pymnts/source/test/";
 		if(add==1)
@@ -74,27 +57,4 @@ app.controller('main', function($scope,$http,$sce) {
 			}
 		);
 	};
-	/*
-
-	$scope.download = function(book) {
-		$http.post("/test/?adasasd",{"type":"BOOK","book":book}).then(
-		function(data) {
-			$scope.getList();
-		},
-		function(data){
-			console.log("error");
-			console.log(data);
-		});
-	};
-	$scope.searchBook = function(book,extension){
-		$http.post("/test/?ewqewqewq", {"type":"search","book":book,"extension":extension}).then(
-		function(data) {
-			console.log("success");
-			$scope.getList();
-		},
-		function(data){
-			console.log("err");
-		});
-	};
-	*/
 });