client/app/search/search_controller.js
changeset 82 6a5e84bf859c
parent 55 10fd23382e76
child 97 0afdaa004ee1
--- a/client/app/search/search_controller.js	Wed Apr 08 17:00:43 2015 +0200
+++ b/client/app/search/search_controller.js	Wed Apr 08 17:02:24 2015 +0200
@@ -9,7 +9,7 @@
 			controller: 'searchCtrl'
 		});
 	})
-	.controller('searchCtrl', function($scope, $location, $routeParams, searchApi, $modal){
+	.controller('searchCtrl', function($scope, $location, $routeParams, searchApi, ammicoApi, $modal){
 		$scope.q = $routeParams.q || '';
 		$scope.results = searchApi.searchResource({q:$scope.q, of: 'json', synthesis: 'false', nresults:'10', callback: 'JSON_CALLBACK'}).getJsonp();
 		
@@ -26,7 +26,7 @@
 					book: idBook,
 					idInventory: $scope.results.hits[index].metas_dict.inventorynumber
 				};
-				searchApi.listSlides.save(newSlide);
+				ammicoApi.listSlides.save(newSlide);
 			});
 		};
 	})