Skip to content

Commit 59fb67f

Browse files
committed
use r.Group to override single endpoints
1 parent ff78bb5 commit 59fb67f

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

coderd/coderd.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -864,13 +864,11 @@ func New(options *Options) *API {
864864
r.Use(
865865
apiKeyMiddleware,
866866
)
867-
api.APISubRoutes.Organizations = r
868867
r.Get("/", api.organizations)
869868
r.Route("/{organization}", func(r chi.Router) {
870869
r.Use(
871870
httpmw.ExtractOrganizationParam(options.Database),
872871
)
873-
api.APISubRoutes.SingleOrganization = r
874872
r.Get("/", api.organization)
875873
r.Post("/templateversions", api.postTemplateVersionsByOrganization)
876874
r.Route("/templates", func(r chi.Router) {
@@ -1335,13 +1333,6 @@ type API struct {
13351333

13361334
// APIHandler serves "/api/v2"
13371335
APIHandler chi.Router
1338-
// APISubRoutes are AGPL sub routers that are saved for enterprise
1339-
// to add endpoints to. Chi does not allow conflicting routers to
1340-
// exist, so this is the easier way to "merge" routers.
1341-
APISubRoutes struct {
1342-
Organizations chi.Router
1343-
SingleOrganization chi.Router
1344-
}
13451336
// RootHandler serves "/"
13461337
RootHandler chi.Router
13471338

0 commit comments

Comments
 (0)