aboutsummaryrefslogtreecommitdiffstats
path: root/models/userlist.go
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-10-17 06:23:08 +0200
committerGitHub <noreply@github.com>2020-10-17 00:23:08 -0400
commitd453533beb197d25b25530dc5f0e3c3c0742d8d1 (patch)
tree6d66e1163333344d91af63e9ab50a82367470b8f /models/userlist.go
parent131278ff222f1a8580f20e6bbdff405341403042 (diff)
downloadgitea-d453533beb197d25b25530dc5f0e3c3c0742d8d1.tar.gz
gitea-d453533beb197d25b25530dc5f0e3c3c0742d8d1.zip
[Refactor] Move APIFormat functions into convert package (#12856)
* USER APIFormat -> ToUser * Migrate more and mark APIFormat deprecated * models.Comment APIFormat() -> convert.ToComment * models.Release APIFormat() -> convert.ToRelease * models.Attachments APIFormat() -> convert.ToReleaseAttachments * models.CommitStatus APIFormat() -> convert.ToCommitStatus * finish migration to convert.ToUser * Move Test * Imprufe Test * fix test Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'models/userlist.go')
-rw-r--r--models/userlist.go10
1 files changed, 0 insertions, 10 deletions
diff --git a/models/userlist.go b/models/userlist.go
index 7e6cab50ba..a2a4248482 100644
--- a/models/userlist.go
+++ b/models/userlist.go
@@ -8,7 +8,6 @@ import (
"fmt"
"code.gitea.io/gitea/modules/log"
- api "code.gitea.io/gitea/modules/structs"
)
//UserList is a list of user.
@@ -94,12 +93,3 @@ func (users UserList) loadTwoFactorStatus(e Engine) (map[int64]*TwoFactor, error
}
return tokenMaps, nil
}
-
-//APIFormat return list of users in api format
-func (users UserList) APIFormat() []*api.User {
- result := make([]*api.User, 0, len(users))
- for _, u := range users {
- result = append(result, u.APIFormat())
- }
- return result
-}