diff options
author | Unknwon <u@gogs.io> | 2015-12-15 22:57:18 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-12-15 22:57:18 -0500 |
commit | b117befc2b4f5ec1e864e2eeaf99355861be01d7 (patch) | |
tree | a6f3b95e28e606f89d672e5079070b1cd9119c69 /routers/api/v1/api.go | |
parent | 7786cb76f3bfc87f92aaae5cc70cbfa974b76868 (diff) | |
download | gitea-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.go | 3 |
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 |