diff options
author | 6543 <6543@obermui.de> | 2021-03-27 17:45:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-27 17:45:26 +0100 |
commit | 290cf75f9343a43d9770b1d6f8f3332a23357e27 (patch) | |
tree | 520f9f8616fbff3b43a1808ef2d73af3f2fe534b /routers/api/v1/user/key.go | |
parent | f4d27498bdc615605e14f783501e1d1256cd8d22 (diff) | |
download | gitea-290cf75f9343a43d9770b1d6f8f3332a23357e27.tar.gz gitea-290cf75f9343a43d9770b1d6f8f3332a23357e27.zip |
[refactor] Unify the export of user data via API (#15144)
* [refactor] unify how user data is exported via API
* test time via unix timestamp
Diffstat (limited to 'routers/api/v1/user/key.go')
-rw-r--r-- | routers/api/v1/user/key.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/api/v1/user/key.go b/routers/api/v1/user/key.go index df8a11c61f..780cdf417c 100644 --- a/routers/api/v1/user/key.go +++ b/routers/api/v1/user/key.go @@ -25,13 +25,13 @@ func appendPrivateInformation(apiKey *api.PublicKey, key *models.PublicKey, defa apiKey.KeyType = "user" if defaultUser.ID == key.OwnerID { - apiKey.Owner = convert.ToUser(defaultUser, true, true) + apiKey.Owner = convert.ToUser(defaultUser, defaultUser) } else { user, err := models.GetUserByID(key.OwnerID) if err != nil { return apiKey, err } - apiKey.Owner = convert.ToUser(user, true, true) + apiKey.Owner = convert.ToUser(user, user) } } else { apiKey.KeyType = "unknown" |