fixed incorrect url prefix /v1

This commit is contained in:
Brad Rydzewski 2014-10-07 07:57:01 -07:00
parent 95aa714616
commit 8c80f179bd
4 changed files with 5 additions and 5 deletions

View file

@ -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;
// }).

View file

@ -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+')'
}
}

View file

@ -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>

View file

@ -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