27 lines
577 B
JavaScript
27 lines
577 B
JavaScript
|
|
mainApp.factory('Network',[ '$http', 'Identity', function($http, Identity){
|
|
|
|
var data={};
|
|
data.networks=null;
|
|
|
|
var ListId=function(fileToUpload, callback) {
|
|
|
|
|
|
var result=$http.post('../server/index.php',
|
|
$.param({"token" : Identity.getToken(), "task" : "network", 'action':'list_network_ids'}));
|
|
|
|
// Wait and handle the response
|
|
result.then(function (response){
|
|
callback(parseUploadImageAnswer(response, false));
|
|
},function(response){
|
|
callback(parseUploadImageAnswer(response, true));
|
|
});
|
|
|
|
console.log(result)
|
|
|
|
}
|
|
|
|
|
|
}]);
|
|
|
|
|