More fixes

This commit is contained in:
Julius Haertl
2016-07-06 09:00:25 +02:00
parent 0330c01600
commit 4fb6248336
8 changed files with 82 additions and 81 deletions

View File

@@ -3,6 +3,22 @@ app.factory('BoardService', function(ApiService, $http, $q){
ApiService.call(this, $http, ep, $q);
};
BoardService.prototype = angular.copy(ApiService.prototype);
BoardService.prototype.searchUsers = function() {
var url = OC.generateUrl('/apps/deck/share/search/%');
var deferred = $q.defer();
var self = this;
this.sharees = [];
$http.get(url).then(function (response) {
self.sharees = response.data.users;
console.log(this.sharees);
deferred.resolve(response.data);
}, function (error) {
deferred.reject('Error while update ' + self.endpoint);
});
return deferred.promise;
}
service = new BoardService($http, 'boards', $q)
return service;
});