@@ -1108,10 +1108,6 @@ func New(options *Options) *API {
1108
1108
// The idea is to return an empty [], so that the coder CLI won't get blocked accidentally.
1109
1109
r .Get ("/schema" , templateVersionSchemaDeprecated )
1110
1110
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
- })
1115
1111
r .Get ("/rich-parameters" , api .templateVersionRichParameters )
1116
1112
r .Get ("/external-auth" , api .templateVersionExternalAuth )
1117
1113
r .Get ("/variables" , api .templateVersionVariables )
@@ -1177,6 +1173,17 @@ func New(options *Options) *API {
1177
1173
// organization member. This endpoint should match the authz story of
1178
1174
// postWorkspacesByOrganization
1179
1175
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
+ })
1180
1187
})
1181
1188
1182
1189
r .Group (func (r chi.Router ) {
0 commit comments