aboutsummaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorGiteabot <teabot@gitea.io>2023-10-22 19:45:16 +0800
committerGitHub <noreply@github.com>2023-10-22 13:45:16 +0200
commit71803d33e395829e4b7cee2bd4ae078527106a48 (patch)
tree0f22331557f11b669d38bc975b943db12aca3f15 /routers
parenta954cc3fb9d396af61e5d7af7a88d6ebe3abb80b (diff)
downloadgitea-71803d33e395829e4b7cee2bd4ae078527106a48.tar.gz
gitea-71803d33e395829e4b7cee2bd4ae078527106a48.zip
Fix org team endpoint (#27721) (#27729)
Backport #27721 by @lng2020 Fix #27711 Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com>
Diffstat (limited to 'routers')
-rw-r--r--routers/api/v1/api.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go
index a1392e7ad7..0f7027909d 100644
--- a/routers/api/v1/api.go
+++ b/routers/api/v1/api.go
@@ -1302,10 +1302,10 @@ func Routes(ctx gocontext.Context) *web.Route {
Delete(reqToken(), reqOrgMembership(), org.ConcealMember)
})
m.Group("/teams", func() {
- m.Get("", reqToken(), org.ListTeams)
- m.Post("", reqToken(), reqOrgOwnership(), bind(api.CreateTeamOption{}), org.CreateTeam)
- m.Get("/search", reqToken(), org.SearchTeam)
- }, reqOrgMembership())
+ m.Get("", org.ListTeams)
+ m.Post("", reqOrgOwnership(), bind(api.CreateTeamOption{}), org.CreateTeam)
+ m.Get("/search", org.SearchTeam)
+ }, reqToken(), reqOrgMembership())
m.Group("/labels", func() {
m.Get("", org.ListLabels)
m.Post("", reqToken(), reqOrgOwnership(), bind(api.CreateLabelOption{}), org.CreateLabel)