mirror of
https://github.com/coder/coder.git
synced 2025-07-06 15:41:45 +00:00
feat: Implement experiment gated CRUD for workspace proxies (#6928)
* feat: Implement basic moon crud * chore: Implement enterprise endpoints for moons
This commit is contained in:
@ -81,6 +81,22 @@ func New(ctx context.Context, options *Options) (*API, error) {
|
||||
r.Get("/", api.licenses)
|
||||
r.Delete("/{id}", api.deleteLicense)
|
||||
})
|
||||
r.Route("/workspaceproxies", func(r chi.Router) {
|
||||
r.Use(
|
||||
apiKeyMiddleware,
|
||||
api.moonsEnabledMW,
|
||||
)
|
||||
r.Post("/", api.postWorkspaceProxy)
|
||||
r.Get("/", api.workspaceProxies)
|
||||
// TODO: Add specific workspace proxy endpoints.
|
||||
//r.Route("/{proxyName}", func(r chi.Router) {
|
||||
// r.Use(
|
||||
// httpmw.ExtractWorkspaceProxyByNameParam(api.Database),
|
||||
// )
|
||||
//
|
||||
// r.Get("/", api.workspaceProxyByName)
|
||||
//})
|
||||
})
|
||||
r.Route("/organizations/{organization}/groups", func(r chi.Router) {
|
||||
r.Use(
|
||||
apiKeyMiddleware,
|
||||
@ -254,6 +270,7 @@ func (api *API) updateEntitlements(ctx context.Context) error {
|
||||
codersdk.FeatureTemplateRBAC: api.RBAC,
|
||||
codersdk.FeatureExternalProvisionerDaemons: true,
|
||||
codersdk.FeatureAdvancedTemplateScheduling: true,
|
||||
codersdk.FeatureWorkspaceProxy: true,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user