mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-01 04:12:10 +00:00
#1692 add user email APIs
This commit is contained in:
parent
7786cb76f3
commit
b117befc2b
9 changed files with 131 additions and 16 deletions
|
@ -26,6 +26,14 @@ func ApiUser(u *models.User) *api.User {
|
|||
}
|
||||
}
|
||||
|
||||
func ApiEmail(email *models.EmailAddress) *api.Email {
|
||||
return &api.Email{
|
||||
Email: email.Email,
|
||||
Verified: email.IsActivated,
|
||||
Primary: email.IsPrimary,
|
||||
}
|
||||
}
|
||||
|
||||
// ApiRepository converts repository to API format.
|
||||
func ApiRepository(owner *models.User, repo *models.Repository, permission api.Permission) *api.Repository {
|
||||
cl := repo.CloneLink()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue