Skip to content

Commit

Permalink
Fix org team endpoint (go-gitea#27721) (go-gitea#27727)
Browse files Browse the repository at this point in the history
Backport go-gitea#27721 by @lng2020

Fix go-gitea#27711

Co-authored-by: Nanguan Lin <[email protected]>
  • Loading branch information
GiteaBot and lng2020 authored Oct 22, 2023
1 parent 1848858 commit 6919a02
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions routers/api/v1/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -1443,10 +1443,10 @@ func Routes() *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)
Expand Down

0 comments on commit 6919a02

Please sign in to comment.