mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-27 19:00:35 +00:00
fixed incorrect url prefix /v1
This commit is contained in:
parent
95aa714616
commit
8c80f179bd
4 changed files with 5 additions and 5 deletions
|
@ -33,7 +33,7 @@ angular.module('app').controller("RepoController", function($scope, $http, $rout
|
|||
$scope.state = 1;
|
||||
});
|
||||
|
||||
//$http({method: 'GET', url: '/v1/repos/'+repo.host+'/'+repo.owner+"/"+repo.name+"/feed"}).
|
||||
//$http({method: 'GET', url: '/api/repos/'+repo.host+'/'+repo.owner+"/"+repo.name+"/feed"}).
|
||||
// success(function(data, status, headers, config) {
|
||||
// $scope.commits = (typeof data==='string')?[]:data;
|
||||
// }).
|
||||
|
|
|
@ -98,7 +98,7 @@
|
|||
var scheme = window.location.protocol;
|
||||
var host = window.location.host;
|
||||
var path = repo.host+'/'+repo.owner+'/'+repo.name;
|
||||
return '[![Build Status]('+scheme+'//'+host+'/v1/badge/'+path+'/status.svg?branch=master)]('+scheme+'//'+host+'/'+path+')'
|
||||
return '[![Build Status]('+scheme+'//'+host+'/api/badge/'+path+'/status.svg?branch=master)]('+scheme+'//'+host+'/'+path+')'
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -112,7 +112,7 @@
|
|||
var scheme = window.location.protocol;
|
||||
var host = window.location.host;
|
||||
var path = repo.host+'/'+repo.owner+'/'+repo.name;
|
||||
return '[![Build Status]('+scheme+'//'+host+'/v1/badge/'+path+'/status.svg?branch=master)]('+scheme+'//'+host+'/'+path+')'
|
||||
return '[![Build Status]('+scheme+'//'+host+'/api/badge/'+path+'/status.svg?branch=master)]('+scheme+'//'+host+'/'+path+')'
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
<div class="pure-g">
|
||||
<div class="pure-u-1">
|
||||
<a ng-href="/{{ repo | fullPath }}" target="_blank" style="float:right;">
|
||||
<img ng-src="/v1/badge/{{ repo | fullPath }}/status.svg" />
|
||||
<img ng-src="/api/badge/{{ repo | fullPath }}/status.svg" />
|
||||
</a>
|
||||
<h2>Status Badge</h2>
|
||||
</div>
|
||||
|
|
|
@ -98,7 +98,7 @@ func PostRepo(c web.C, w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
// setup the post-commit hook with the remote system and
|
||||
// if necessary, register the public key
|
||||
var hook = fmt.Sprintf("%s/v1/hook/%s", httputil.GetURL(r), repo.Remote)
|
||||
var hook = fmt.Sprintf("%s/api/hook/%s", httputil.GetURL(r), repo.Remote)
|
||||
if err := remote.Activate(user, repo, hook); err != nil {
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue