forked from forgejo/forgejo
#1692 add user email APIs
This commit is contained in:
parent
7786cb76f3
commit
b117befc2b
9 changed files with 131 additions and 16 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue