woodpecker/cmd/drone-server/static/scripts/services/tokens.js
2015-09-09 14:34:28 -07:00

22 lines
No EOL
361 B
JavaScript

'use strict';
(function () {
/**
* The TokenService provides access to user token
* data using REST API calls.
*/
function TokenService($http, $window) {
/**
* Generates a user API token.
*/
this.post = function(token) {
return $http.post('/api/user/token');
};
}
angular
.module('drone')
.service('tokens', TokenService);
})();