diff options
author | KN4CK3R <KN4CK3R@users.noreply.github.com> | 2021-05-02 21:03:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-02 21:03:15 +0200 |
commit | 8c8471e75464fa6253a44cdbb8f6ad233aae9067 (patch) | |
tree | f8fd7e87b26f2b735208cb95de147c2ef93d814e /modules/structs/admin_user.go | |
parent | 0590176a23c056b274bd30ff7cec8f8a203f0665 (diff) | |
download | gitea-8c8471e75464fa6253a44cdbb8f6ad233aae9067.tar.gz gitea-8c8471e75464fa6253a44cdbb8f6ad233aae9067.zip |
Addition to (Add Location, Website and Description to API #15675) (#15690)
* Use same name as other structs.
* Sync with normal forms.
* Edit description with API.
* Workaround for nil value.
Diffstat (limited to 'modules/structs/admin_user.go')
-rw-r--r-- | modules/structs/admin_user.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/structs/admin_user.go b/modules/structs/admin_user.go index ee1738579a..5da4e9608b 100644 --- a/modules/structs/admin_user.go +++ b/modules/structs/admin_user.go @@ -32,8 +32,9 @@ type EditUserOption struct { FullName *string `json:"full_name" binding:"MaxSize(100)"` Password string `json:"password" binding:"MaxSize(255)"` MustChangePassword *bool `json:"must_change_password"` - Website *string `json:"website" binding:"MaxSize(50)"` + Website *string `json:"website" binding:"OmitEmpty;ValidUrl;MaxSize(255)"` Location *string `json:"location" binding:"MaxSize(50)"` + Description *string `json:"description" binding:"MaxSize(255)"` Active *bool `json:"active"` Admin *bool `json:"admin"` AllowGitHook *bool `json:"allow_git_hook"` |