Skip to content

Commit

Permalink
Definition tags api.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Sep 10, 2018
1 parent 759bfac commit 6a2269c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/controller/git-client/info.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ exports.serviceRespond = async (ctx) => {

ctx.set('content-type', 'application/x-git-' + serviceType + '-advertisement');
ctx.body = dup;
}
}
9 changes: 9 additions & 0 deletions src/controller/git/repos/tags.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

module.exports = {
detail: async (ctx) => {

},
list: async (ctx) => {

},
}
2 changes: 1 addition & 1 deletion src/routes/git-client/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ router
.get('/:owner/:repo/info/refs', info.auth, info.authorization, info.noCache, info.serviceRespond)
.post('/:owner/:repo/git-:service', action.authUserAccount, action.action)

module.exports = router;
module.exports = router;
3 changes: 3 additions & 0 deletions src/routes/git/repos.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const Router = require('koa-router');
const repos = require('../../controller/git/repos');
const tags = require('../../controller/git/repos/tags');

const router = new Router({
prefix: '/api'
Expand All @@ -10,6 +11,8 @@ router
.post('/user/repos', repos.created)
.get('/repos/:id/tree', repos.reposTree)
.get('/repos/:owner/:repo', repos.detail)
.get('/repos/:owner/:repo/tags', tags.list)
.get('/repos/:owner/:repo/tags/:tag_name', tags.detail)
.get('/repos/:owner/:repo/readme', repos.readme)
.get('/repos/:owner/:repo/blob/:ref/*', repos.fileDetail)
.get('/orgs/:org/repos', repos.orgReposList)
Expand Down

0 comments on commit 6a2269c

Please sign in to comment.