summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/api.go
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-04-08 04:54:46 +0200
committerGitHub <noreply@github.com>2020-04-07 22:54:46 -0400
commit3d63caa54245d87dd057d4e853bb5dc7fc39e7db (patch)
tree2fbbb48a39cff157f8cf171b0dad51af366c0908 /routers/api/v1/api.go
parent71979d9663d8e43b772c37f2a79af5b8911df661 (diff)
downloadgitea-3d63caa54245d87dd057d4e853bb5dc7fc39e7db.tar.gz
gitea-3d63caa54245d87dd057d4e853bb5dc7fc39e7db.zip
[API] Get a single commit via Ref (#10915)
* GET /repos/:owner/:repo/commits/:ref * add Validation Checks * Fix & Extend TEST * add two new tast cases
Diffstat (limited to 'routers/api/v1/api.go')
-rw-r--r--routers/api/v1/api.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go
index e5bb98033b..8fc1eeefd1 100644
--- a/routers/api/v1/api.go
+++ b/routers/api/v1/api.go
@@ -798,14 +798,14 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Group("/commits", func() {
m.Get("", repo.GetAllCommits)
m.Group("/:ref", func() {
- // TODO: Add m.Get("") for single commit (https://developer.github.com/v3/repos/commits/#get-a-single-commit)
+ m.Get("", repo.GetSingleCommitByRef)
m.Get("/status", repo.GetCombinedCommitStatusByRef)
m.Get("/statuses", repo.GetCommitStatusesByRef)
})
}, reqRepoReader(models.UnitTypeCode))
m.Group("/git", func() {
m.Group("/commits", func() {
- m.Get("/:sha", repo.GetSingleCommit)
+ m.Get("/:sha", repo.GetSingleCommitBySHA)
})
m.Get("/refs", repo.GetGitAllRefs)
m.Get("/refs/*", repo.GetGitRefs)