1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-12-30 10:11:23 +02:00
woodpecker/server/app/scripts/services/user.js

16 lines
435 B
JavaScript
Raw Normal View History

'use strict';
angular.module('app').service('users', ['$http', function($http) {
this.getCurrent = function() {
2014-09-30 10:43:50 +03:00
return $http.get('/api/user');
};
this.get = function(host, login) {
2014-09-30 10:43:50 +03:00
return $http.get('/api/users/'+host+'/'+login);
};
this.create = function(host, login) {
2014-09-30 10:43:50 +03:00
return $http.post('/api/users/'+host+'/'+login);
};
this.delete = function(host, login) {
2014-09-30 10:43:50 +03:00
return $http.delete('/api/users/'+host+'/'+login);
};
}]);