mirror of
https://github.com/nextcloud/passman.git
synced 2025-01-11 01:39:56 +08:00
26 lines
553 B
JavaScript
26 lines
553 B
JavaScript
|
'use strict';
|
||
|
|
||
|
/**
|
||
|
* @ngdoc service
|
||
|
* @name passmanApp.ShareService
|
||
|
* @description
|
||
|
* # ShareService
|
||
|
* Service in the passmanApp.
|
||
|
*/
|
||
|
angular.module('passmanApp')
|
||
|
.service('ShareService', ['$http', function ($http) {
|
||
|
var _tags = [];
|
||
|
return {
|
||
|
search: function (string) {
|
||
|
var queryUrl = OC.generateUrl('apps/passman/api/v2/sharing/search');
|
||
|
return $http.post(queryUrl, {search: string}).then(function (response) {
|
||
|
if (response.data) {
|
||
|
return response.data;
|
||
|
} else {
|
||
|
return response;
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
}]);
|