summaryrefslogtreecommitdiffstats
path: root/cmd/web.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2017-04-19 11:45:01 +0800
committerGitHub <noreply@github.com>2017-04-19 11:45:01 +0800
commit2eeae84cbd80544157a82c7f031489eaaceaa873 (patch)
treea275f41a3bb552df39724d4eca3dcdffe47dff8f /cmd/web.go
parentf42ec6120e8a2830407027020b65391ebf8e7f59 (diff)
downloadgitea-2eeae84cbd80544157a82c7f031489eaaceaa873.tar.gz
gitea-2eeae84cbd80544157a82c7f031489eaaceaa873.zip
Add internal routes for ssh hook comands (#1471)
* add internal routes for ssh hook comands * fix lint * add comment on why package named private not internal but the route name is internal * add comment above package private why package named private not internal but the route name is internal * remove exp time on internal access * move routes from /internal to /api/internal * add comment and defer on UpdatePublicKeyUpdated
Diffstat (limited to 'cmd/web.go')
-rw-r--r--cmd/web.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/web.go b/cmd/web.go
index 411b50d9bf..a4d798d16e 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -29,6 +29,7 @@ import (
apiv1 "code.gitea.io/gitea/routers/api/v1"
"code.gitea.io/gitea/routers/dev"
"code.gitea.io/gitea/routers/org"
+ "code.gitea.io/gitea/routers/private"
"code.gitea.io/gitea/routers/repo"
"code.gitea.io/gitea/routers/user"
@@ -661,6 +662,11 @@ func runWeb(ctx *cli.Context) error {
apiv1.RegisterRoutes(m)
}, ignSignIn)
+ m.Group("/api/internal", func() {
+ // package name internal is ideal but Golang is not allowed, so we use private as package name.
+ private.RegisterRoutes(m)
+ })
+
// robots.txt
m.Get("/robots.txt", func(ctx *context.Context) {
if setting.HasRobotsTxt {