add admin API email endpoints (#22792)

add email endpoint to admin API to ensure API parity with admin
dashboard.
This commit is contained in:
techknowlogick 2023-03-14 03:54:40 -04:00 committed by GitHub
parent 03591f0f95
commit d56bb74201
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 188 additions and 0 deletions

View file

@ -1,4 +1,5 @@
// Copyright 2015 The Gogs Authors. All rights reserved.
// Copyright 2023 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package structs
@ -9,6 +10,8 @@ type Email struct {
Email string `json:"email"`
Verified bool `json:"verified"`
Primary bool `json:"primary"`
UserID int64 `json:"user_id"`
UserName string `json:"username"`
}
// CreateEmailOption options when creating email addresses