@@ -1108,10 +1108,6 @@ func New(options *Options) *API {
11081108 // The idea is to return an empty [], so that the coder CLI won't get blocked accidentally.
11091109 r .Get ("/schema" , templateVersionSchemaDeprecated )
11101110 r .Get ("/parameters" , templateVersionParametersDeprecated )
1111- r .Group (func (r chi.Router ) {
1112- r .Use (httpmw .RequireExperiment (api .Experiments , codersdk .ExperimentDynamicParameters ))
1113- r .Get ("/dynamic-parameters" , api .templateVersionDynamicParameters )
1114- })
11151111 r .Get ("/rich-parameters" , api .templateVersionRichParameters )
11161112 r .Get ("/external-auth" , api .templateVersionExternalAuth )
11171113 r .Get ("/variables" , api .templateVersionVariables )
@@ -1177,6 +1173,17 @@ func New(options *Options) *API {
11771173 // organization member. This endpoint should match the authz story of
11781174 // postWorkspacesByOrganization
11791175 r .Post ("/workspaces" , api .postUserWorkspaces )
1176+
1177+ // Similarly to creating a workspace, evaluating parameters for a
1178+ // new workspace should also match the authz story of
1179+ // postWorkspacesByOrganization
1180+ r .Route ("/templateversions/{templateversion}" , func (r chi.Router ) {
1181+ r .Use (
1182+ httpmw .ExtractTemplateVersionParam (options .Database ),
1183+ httpmw .RequireExperiment (api .Experiments , codersdk .ExperimentDynamicParameters ),
1184+ )
1185+ r .Get ("/parameters" , api .templateVersionDynamicParameters )
1186+ })
11801187 })
11811188
11821189 r .Group (func (r chi.Router ) {
0 commit comments