From 66ac6571597ac77160e38856618f8720a003816b Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Thu, 29 Feb 2024 11:10:18 +0100 Subject: [PATCH] Add Pronouns to the User and UserSettings api structs Signed-off-by: Gergely Nagy --- modules/structs/user.go | 3 +++ templates/swagger/v1_json.tmpl | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/modules/structs/user.go b/modules/structs/user.go index 9e4858115c..82b565e5e7 100644 --- a/modules/structs/user.go +++ b/modules/structs/user.go @@ -41,6 +41,8 @@ type User struct { ProhibitLogin bool `json:"prohibit_login"` // the user's location Location string `json:"location"` + // the user's pronouns + Pronouns string `json:"pronouns"` // the user's website Website string `json:"website"` // the user's description @@ -71,6 +73,7 @@ type UserSettings struct { Website string `json:"website"` Description string `json:"description"` Location string `json:"location"` + Pronouns string `json:"pronouns"` Language string `json:"language"` Theme string `json:"theme"` DiffViewStyle string `json:"diff_view_style"` diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 44aac59583..bcf370b3fb 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -23834,6 +23834,11 @@ "type": "boolean", "x-go-name": "ProhibitLogin" }, + "pronouns": { + "description": "the user's pronouns", + "type": "string", + "x-go-name": "Pronouns" + }, "restricted": { "description": "Is user restricted", "type": "boolean", @@ -23909,6 +23914,10 @@ "type": "string", "x-go-name": "Location" }, + "pronouns": { + "type": "string", + "x-go-name": "Pronouns" + }, "theme": { "type": "string", "x-go-name": "Theme"