summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/api.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-12-15 22:57:18 -0500
committerUnknwon <u@gogs.io>2015-12-15 22:57:18 -0500
commitb117befc2b4f5ec1e864e2eeaf99355861be01d7 (patch)
treea6f3b95e28e606f89d672e5079070b1cd9119c69 /routers/api/v1/api.go
parent7786cb76f3bfc87f92aaae5cc70cbfa974b76868 (diff)
downloadgitea-b117befc2b4f5ec1e864e2eeaf99355861be01d7.tar.gz
gitea-b117befc2b4f5ec1e864e2eeaf99355861be01d7.zip
#1692 add user email APIs
Diffstat (limited to 'routers/api/v1/api.go')
-rw-r--r--routers/api/v1/api.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go
index 1ac60c26b9..eeba713945 100644
--- a/routers/api/v1/api.go
+++ b/routers/api/v1/api.go
@@ -144,6 +144,9 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Combo("/:id").Get(user.GetPublicKey).
Delete(user.DeletePublicKey)
})
+ m.Combo("/emails").Get(user.ListEmails).
+ Post(bind(api.CreateEmailOption{}), user.AddEmail).
+ Delete(bind(api.CreateEmailOption{}), user.DeleteEmail)
}, ReqToken())
// Repositories