diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2021-11-11 15:03:30 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-11 15:03:30 +0800 |
commit | 90eb9fb889e5d3a5845576dbc63e3792f3da33f2 (patch) | |
tree | 4107df9dd446fe9a93e49cba1e59d0f721e70351 /modules/convert | |
parent | 492e1c2fbd1b646f4428207942a9f89b56f7b6a9 (diff) | |
download | gitea-90eb9fb889e5d3a5845576dbc63e3792f3da33f2.tar.gz gitea-90eb9fb889e5d3a5845576dbc63e3792f3da33f2.zip |
Move EmailAddress & UserRedirect into models/user/ (#17607)
* Move EmailAddress into models/user/
* Fix test
* rename user_mail to user_email
* Fix test
* Move UserRedirect into models/user/
* Fix lint & test
* Fix lint
* Fix lint
* remove nolint comment
* Fix lint
Diffstat (limited to 'modules/convert')
-rw-r--r-- | modules/convert/convert.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/convert/convert.go b/modules/convert/convert.go index 7d67e2b5b1..80d5ffff05 100644 --- a/modules/convert/convert.go +++ b/modules/convert/convert.go @@ -14,6 +14,7 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/models/login" "code.gitea.io/gitea/models/unit" + user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/models/webhook" "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" @@ -23,7 +24,7 @@ import ( ) // ToEmail convert models.EmailAddress to api.Email -func ToEmail(email *models.EmailAddress) *api.Email { +func ToEmail(email *user_model.EmailAddress) *api.Email { return &api.Email{ Email: email.Email, Verified: email.IsActivated, @@ -219,7 +220,7 @@ func ToGPGKey(key *models.GPGKey) *api.GPGKey { } // ToGPGKeyEmail convert models.EmailAddress to api.GPGKeyEmail -func ToGPGKeyEmail(email *models.EmailAddress) *api.GPGKeyEmail { +func ToGPGKeyEmail(email *user_model.EmailAddress) *api.GPGKeyEmail { return &api.GPGKeyEmail{ Email: email.Email, Verified: email.IsActivated, |