diff options
author | hazycora <hazysu@riseup.net> | 2023-09-26 04:39:12 +0200 |
---|---|---|
committer | hazycora <hazysu@riseup.net> | 2024-04-03 22:11:17 +0200 |
commit | f8e48e066af107225c7bdcae6ed16b067e175e2b (patch) | |
tree | f2579110ca008e69251b0608d61bb96907e9df83 /routers | |
parent | Merge pull request 'Port archived labels visual filter' (#2887) from 0ko/forg... (diff) | |
download | forgejo-f8e48e066af107225c7bdcae6ed16b067e175e2b.tar.xz forgejo-f8e48e066af107225c7bdcae6ed16b067e175e2b.zip |
add pronoun field to user profiles
Diffstat (limited to 'routers')
-rw-r--r-- | routers/api/v1/admin/user.go | 1 | ||||
-rw-r--r-- | routers/api/v1/user/settings.go | 1 | ||||
-rw-r--r-- | routers/web/user/setting/profile.go | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/routers/api/v1/admin/user.go b/routers/api/v1/admin/user.go index 87a5b28fad..12da8a9597 100644 --- a/routers/api/v1/admin/user.go +++ b/routers/api/v1/admin/user.go @@ -236,6 +236,7 @@ func EditUser(ctx *context.APIContext) { Website: optional.FromPtr(form.Website), Location: optional.FromPtr(form.Location), Description: optional.FromPtr(form.Description), + Pronouns: optional.FromPtr(form.Pronouns), IsActive: optional.FromPtr(form.Active), IsAdmin: optional.FromPtr(form.Admin), Visibility: optional.FromNonDefault(api.VisibilityModes[form.Visibility]), diff --git a/routers/api/v1/user/settings.go b/routers/api/v1/user/settings.go index f594eb211c..bfd24013db 100644 --- a/routers/api/v1/user/settings.go +++ b/routers/api/v1/user/settings.go @@ -48,6 +48,7 @@ func UpdateUserSettings(ctx *context.APIContext) { opts := &user_service.UpdateOptions{ FullName: optional.FromPtr(form.FullName), Description: optional.FromPtr(form.Description), + Pronouns: optional.FromPtr(form.Pronouns), Website: optional.FromPtr(form.Website), Location: optional.FromPtr(form.Location), Language: optional.FromPtr(form.Language), diff --git a/routers/web/user/setting/profile.go b/routers/web/user/setting/profile.go index 4e5c380ed9..b5d916b78f 100644 --- a/routers/web/user/setting/profile.go +++ b/routers/web/user/setting/profile.go @@ -90,6 +90,7 @@ func ProfilePost(ctx *context.Context) { FullName: optional.Some(form.FullName), KeepEmailPrivate: optional.Some(form.KeepEmailPrivate), Description: optional.Some(form.Description), + Pronouns: optional.Some(form.Pronouns), Website: optional.Some(form.Website), Location: optional.Some(form.Location), Visibility: optional.Some(form.Visibility), |