mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-19 08:21:01 +00:00
23 lines
355 B
JavaScript
23 lines
355 B
JavaScript
|
'use strict';
|
||
|
|
||
|
(function () {
|
||
|
|
||
|
/**
|
||
|
* The Agent provides access to build agent
|
||
|
* data and management using REST API calls.
|
||
|
*/
|
||
|
function AgentService($http) {
|
||
|
|
||
|
/**
|
||
|
* Gets an agent token.
|
||
|
*/
|
||
|
this.getToken = function() {
|
||
|
return $http.get('/api/agents/token');
|
||
|
};
|
||
|
}
|
||
|
|
||
|
angular
|
||
|
.module('drone')
|
||
|
.service('agents', AgentService);
|
||
|
})();
|