From 681e81babdbbe777b3ea2af353b872aee2dd9b32 Mon Sep 17 00:00:00 2001 From: zeripath Date: Mon, 21 Jun 2021 14:01:44 +0100 Subject: reqOrgMembership calls need to be preceded by reqToken (#16198) ReqOrgMembership calls need to be preceded by reqToken Fix #16192 Signed-off-by: Andrew Thornton Co-authored-by: 6543 <6543@obermui.de> --- routers/api/v1/api.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'routers/api') diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index 34cf80e072..9efc2af244 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -989,10 +989,10 @@ func Routes() *web.Route { Delete(reqToken(), reqOrgMembership(), org.ConcealMember) }) m.Group("/teams", func() { - m.Combo("", reqToken()).Get(org.ListTeams). - Post(reqOrgOwnership(), bind(api.CreateTeamOption{}), org.CreateTeam) + m.Get("", org.ListTeams) + m.Post("", reqOrgOwnership(), bind(api.CreateTeamOption{}), org.CreateTeam) m.Get("/search", org.SearchTeam) - }, reqOrgMembership()) + }, reqToken(), reqOrgMembership()) m.Group("/labels", func() { m.Get("", org.ListLabels) m.Post("", reqToken(), reqOrgOwnership(), bind(api.CreateLabelOption{}), org.CreateLabel) -- cgit v1.2.3