mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-25 14:35:40 +00:00
services/convert/user: Convert pronouns properly
When converting from a `user_model.User` to `api.User` or `api.UserSettings`, convert the `Pronouns` field too. Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
This commit is contained in:
parent
66ac657159
commit
efa9649696
|
@ -56,6 +56,7 @@ func toUser(ctx context.Context, user *user_model.User, signed, authed bool) *ap
|
||||||
Created: user.CreatedUnix.AsTime(),
|
Created: user.CreatedUnix.AsTime(),
|
||||||
Restricted: user.IsRestricted,
|
Restricted: user.IsRestricted,
|
||||||
Location: user.Location,
|
Location: user.Location,
|
||||||
|
Pronouns: user.Pronouns,
|
||||||
Website: user.Website,
|
Website: user.Website,
|
||||||
Description: user.Description,
|
Description: user.Description,
|
||||||
// counter's
|
// counter's
|
||||||
|
@ -89,6 +90,7 @@ func User2UserSettings(user *user_model.User) api.UserSettings {
|
||||||
FullName: user.FullName,
|
FullName: user.FullName,
|
||||||
Website: user.Website,
|
Website: user.Website,
|
||||||
Location: user.Location,
|
Location: user.Location,
|
||||||
|
Pronouns: user.Pronouns,
|
||||||
Language: user.Language,
|
Language: user.Language,
|
||||||
Description: user.Description,
|
Description: user.Description,
|
||||||
Theme: user.Theme,
|
Theme: user.Theme,
|
||||||
|
|
Loading…
Reference in a new issue