blob: 817c9e9cd122dbe518519f5fd395f8dff9124dea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
/**
* Nextcloud - News
*
* @author Marco Nassabain <marco.nassabain@hotmail.com>
*/
app.factory('UserResource', function (Resource, $http, BASE_URL) {
'use strict';
var UserResource = function ($http, BASE_URL) {
Resource.call(this, $http, BASE_URL);
};
UserResource.prototype = Object.create(Resource.prototype);
UserResource.prototype.getUsers = function (search) {
return this.http({
url: OC.linkToOCS(`cloud/users?search=${search}&offset=0&limit=5`, 2),
method: 'GET',
}).then(function(response) {
return response.data;
});
};
return new UserResource($http, BASE_URL);
});
|