'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; } }); } } }]);