mirror of
1
Fork 0

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
1 changed files with 2 additions and 0 deletions

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,