1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-12-18 08:26:45 +02:00
woodpecker/server/app/scripts/services/user.js

16 lines
431 B
JavaScript

'use strict';
angular.module('app').service('users', ['$http', function($http) {
this.getCurrent = function() {
return $http.get('/v1/user');
};
this.get = function(host, login) {
return $http.get('/v1/users/'+host+'/'+login);
};
this.create = function(host, login) {
return $http.post('/v1/users/'+host+'/'+login);
};
this.delete = function(host, login) {
return $http.delete('/v1/users/'+host+'/'+login);
};
}]);