summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/serv.go3
-rw-r--r--cmd/web.go6
2 files changed, 8 insertions, 1 deletions
diff --git a/cmd/serv.go b/cmd/serv.go
index d7e89ab98d..f7d025c68e 100644
--- a/cmd/serv.go
+++ b/cmd/serv.go
@@ -16,6 +16,7 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/log"
+ "code.gitea.io/gitea/modules/private"
"code.gitea.io/gitea/modules/setting"
"github.com/Unknwon/com"
@@ -318,7 +319,7 @@ func runServ(c *cli.Context) error {
// Update user key activity.
if keyID > 0 {
- if err = models.UpdatePublicKeyUpdated(keyID); err != nil {
+ if err = private.UpdatePublicKeyUpdated(keyID); err != nil {
fail("Internal error", "UpdatePublicKey: %v", err)
}
}
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 {