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:
Gergely Nagy 2024-02-29 12:51:06 +01:00 committed by hazycora
parent 66ac657159
commit efa9649696
No known key found for this signature in database
GPG key ID: 215AF1F81F86940E

View file

@ -56,6 +56,7 @@ func toUser(ctx context.Context, user *user_model.User, signed, authed bool) *ap
Created: user.CreatedUnix.AsTime(),
Restricted: user.IsRestricted,
Location: user.Location,
Pronouns: user.Pronouns,
Website: user.Website,
Description: user.Description,
// counter's
@ -89,6 +90,7 @@ func User2UserSettings(user *user_model.User) api.UserSettings {
FullName: user.FullName,
Website: user.Website,
Location: user.Location,
Pronouns: user.Pronouns,
Language: user.Language,
Description: user.Description,
Theme: user.Theme,