mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-14 14:25:36 +01:00
23 lines
477 B
JavaScript
23 lines
477 B
JavaScript
(function() {
|
|
|
|
'use strict';
|
|
|
|
angular
|
|
.module('harbor.services.user')
|
|
.factory('UserExistService', UserExistService);
|
|
|
|
UserExistService.$inject = ['$http', '$log'];
|
|
|
|
function UserExistService($http, $log) {
|
|
return userExist;
|
|
function userExist(target, value) {
|
|
return $.ajax({
|
|
type: 'POST',
|
|
url: '/userExists',
|
|
async: false,
|
|
data: {'target': target, 'value': value}
|
|
});
|
|
}
|
|
}
|
|
|
|
})(); |