mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
chore: fill out workspace owner data for dynamic parameters (#17366)
This commit is contained in:
@ -1108,10 +1108,6 @@ func New(options *Options) *API {
|
||||
// The idea is to return an empty [], so that the coder CLI won't get blocked accidentally.
|
||||
r.Get("/schema", templateVersionSchemaDeprecated)
|
||||
r.Get("/parameters", templateVersionParametersDeprecated)
|
||||
r.Group(func(r chi.Router) {
|
||||
r.Use(httpmw.RequireExperiment(api.Experiments, codersdk.ExperimentDynamicParameters))
|
||||
r.Get("/dynamic-parameters", api.templateVersionDynamicParameters)
|
||||
})
|
||||
r.Get("/rich-parameters", api.templateVersionRichParameters)
|
||||
r.Get("/external-auth", api.templateVersionExternalAuth)
|
||||
r.Get("/variables", api.templateVersionVariables)
|
||||
@ -1177,6 +1173,17 @@ func New(options *Options) *API {
|
||||
// organization member. This endpoint should match the authz story of
|
||||
// postWorkspacesByOrganization
|
||||
r.Post("/workspaces", api.postUserWorkspaces)
|
||||
|
||||
// Similarly to creating a workspace, evaluating parameters for a
|
||||
// new workspace should also match the authz story of
|
||||
// postWorkspacesByOrganization
|
||||
r.Route("/templateversions/{templateversion}", func(r chi.Router) {
|
||||
r.Use(
|
||||
httpmw.ExtractTemplateVersionParam(options.Database),
|
||||
httpmw.RequireExperiment(api.Experiments, codersdk.ExperimentDynamicParameters),
|
||||
)
|
||||
r.Get("/parameters", api.templateVersionDynamicParameters)
|
||||
})
|
||||
})
|
||||
|
||||
r.Group(func(r chi.Router) {
|
||||
|
Reference in New Issue
Block a user