summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-11-18 21:21:47 -0500
committerUnknwon <u@gogs.io>2015-11-18 21:21:47 -0500
commitf455125d4de8c788143a24edefb8c6b2cef0f524 (patch)
treeb6a258d73a3e25362fd0005b2954ebe84869fede /cmd
parentdf339ad8b0c4f8858a53a4890ded97a1e3208b13 (diff)
downloadgitea-f455125d4de8c788143a24edefb8c6b2cef0f524.tar.gz
gitea-f455125d4de8c788143a24edefb8c6b2cef0f524.zip
fix #878
Diffstat (limited to 'cmd')
-rw-r--r--cmd/web.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmd/web.go b/cmd/web.go
index cb14b7c946..a5a7db5ffe 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -238,6 +238,13 @@ func runWeb(ctx *cli.Context) {
m.Patch("/hooks/:id:int", bind(api.EditHookOption{}), v1.EditRepoHook)
m.Get("/raw/*", middleware.RepoRef(), v1.GetRepoRawFile)
m.Get("/archive/*", v1.GetRepoArchive)
+
+ m.Group("/keys", func() {
+ m.Combo("").Get(v1.ListRepoDeployKeys).
+ Post(bind(api.CreateDeployKeyOption{}), v1.CreateRepoDeployKey)
+ m.Combo("/:id").Get(v1.GetRepoDeployKey).
+ Delete(v1.DeleteRepoDeploykey)
+ })
}, middleware.ApiRepoAssignment())
}, middleware.ApiReqToken())