mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-19 15:06:34 +00:00
16 lines
No EOL
435 B
JavaScript
16 lines
No EOL
435 B
JavaScript
'use strict';
|
|
|
|
angular.module('app').service('users', ['$http', function($http) {
|
|
this.getCurrent = function() {
|
|
return $http.get('/api/user');
|
|
};
|
|
this.get = function(host, login) {
|
|
return $http.get('/api/users/'+host+'/'+login);
|
|
};
|
|
this.create = function(host, login) {
|
|
return $http.post('/api/users/'+host+'/'+login);
|
|
};
|
|
this.delete = function(host, login) {
|
|
return $http.delete('/api/users/'+host+'/'+login);
|
|
};
|
|
}]); |