diff options
author | 6543 <6543@obermui.de> | 2020-01-09 14:15:14 +0100 |
---|---|---|
committer | zeripath <art27@cantab.net> | 2020-01-09 13:15:14 +0000 |
commit | 1080c768d33a2c4846467d2e2913df87237b8b23 (patch) | |
tree | 0c9fd7f0da7e53bb6eeffa65aec793823bd8eb89 /modules/structs | |
parent | 71fe01897743915b8fc8bb8d07f44ee6214d1e50 (diff) | |
download | gitea-1080c768d33a2c4846467d2e2913df87237b8b23.tar.gz gitea-1080c768d33a2c4846467d2e2913df87237b8b23.zip |
[API] orgEditTeam make Fields optional (#9556)
* API: orgEditTeam make Fields optional
* add TestCase
* Update integrations/api_team_test.go
* suggestions from lafriks
use len() to check if string is empty
Co-Authored-By: Lauris BH <lauris@nix.lv>
* change ...
* use Where not ID to get mssql
* add return and code format
* fix test
* fix test ... null pointer exept
* update specific colums
* only specific colums too
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'modules/structs')
-rw-r--r-- | modules/structs/org_team.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/structs/org_team.go b/modules/structs/org_team.go index 16f83823d6..a742b7b224 100644 --- a/modules/structs/org_team.go +++ b/modules/structs/org_team.go @@ -35,12 +35,12 @@ type CreateTeamOption struct { // EditTeamOption options for editing a team type EditTeamOption struct { // required: true - Name string `json:"name" binding:"Required;AlphaDashDot;MaxSize(30)"` - Description string `json:"description" binding:"MaxSize(255)"` - IncludesAllRepositories bool `json:"includes_all_repositories"` + Name string `json:"name" binding:"AlphaDashDot;MaxSize(30)"` + Description *string `json:"description" binding:"MaxSize(255)"` + IncludesAllRepositories *bool `json:"includes_all_repositories"` // enum: read,write,admin Permission string `json:"permission"` // example: ["repo.code","repo.issues","repo.ext_issues","repo.wiki","repo.pulls","repo.releases","repo.ext_wiki"] Units []string `json:"units"` - CanCreateOrgRepo bool `json:"can_create_org_repo"` + CanCreateOrgRepo *bool `json:"can_create_org_repo"` } |