summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/api.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/api.go')
-rw-r--r--routers/api/v1/api.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go
index ca4592c607..2a1f5e196c 100644
--- a/routers/api/v1/api.go
+++ b/routers/api/v1/api.go
@@ -254,6 +254,7 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Group("/users", func() {
m.Group("/:username", func() {
m.Get("/keys", user.ListPublicKeys)
+ m.Get("/gpg_keys", user.ListGPGKeys)
m.Get("/followers", user.ListFollowers)
m.Group("/following", func() {
@@ -286,6 +287,13 @@ func RegisterRoutes(m *macaron.Macaron) {
Delete(user.DeletePublicKey)
})
+ m.Group("/gpg_keys", func() {
+ m.Combo("").Get(user.ListMyGPGKeys).
+ Post(bind(api.CreateGPGKeyOption{}), user.CreateGPGKey)
+ m.Combo("/:id").Get(user.GetGPGKey).
+ Delete(user.DeleteGPGKey)
+ })
+
m.Combo("/repos").Get(user.ListMyRepos).
Post(bind(api.CreateRepoOption{}), repo.Create)