mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-30 20:30:31 +00:00
15 lines
325 B
JavaScript
15 lines
325 B
JavaScript
|
'use strict';
|
||
|
|
||
|
angular.module('app').service('repoService', function($q, $http) {
|
||
|
return{
|
||
|
getRepo : function(host, owner, name) {
|
||
|
var defer = $q.defer();
|
||
|
var route = '/v1/repos/'+host+'/'+owner+'/'+name;
|
||
|
$http.get(route).success(function(data){
|
||
|
defer.resolve(data);
|
||
|
});
|
||
|
return defer.promise;
|
||
|
}
|
||
|
}
|
||
|
});
|