Skip to content

Commit 9294a73

Browse files
committed
gen
1 parent c4b7183 commit 9294a73

File tree

10 files changed

+88
-73
lines changed

10 files changed

+88
-73
lines changed

coderd/apidoc/docs.go

+24-19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/apidoc/swagger.json

+20-13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/database/modelqueries.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ func (q *sqlQuerier) GetAuthorizedTemplates(ctx context.Context, arg GetTemplate
9090
&i.RequireActiveVersion,
9191
&i.Deprecated,
9292
&i.UseMaxTtl,
93-
&i.MaxPortShareLevel,
93+
&i.MaxPortSharingLevel,
9494
&i.CreatedByAvatarURL,
9595
&i.CreatedByUsername,
9696
); err != nil {

coderd/database/models.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/database/queries.sql.go

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/templates.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ func (api *API) patchTemplateMeta(rw http.ResponseWriter, r *http.Request) {
631631
if req.TimeTilDormantAutoDeleteMillis < 0 || (req.TimeTilDormantAutoDeleteMillis > 0 && req.TimeTilDormantAutoDeleteMillis < minTTL) {
632632
validErrs = append(validErrs, codersdk.ValidationError{Field: "time_til_dormant_autodelete_ms", Detail: "Value must be at least one minute."})
633633
}
634-
maxPortShareLevel := template.MaxPortShareLevel
634+
maxPortShareLevel := template.MaxPortSharingLevel
635635
if req.MaxPortShareLevel != nil {
636636
if *req.MaxPortShareLevel < 0 || *req.MaxPortShareLevel > 2 {
637637
validErrs = append(validErrs, codersdk.ValidationError{Field: "max_port_sharing_level", Detail: "Value must be between 0 and 2."})
@@ -671,7 +671,7 @@ func (api *API) patchTemplateMeta(rw http.ResponseWriter, r *http.Request) {
671671
req.TimeTilDormantAutoDeleteMillis == time.Duration(template.TimeTilDormantAutoDelete).Milliseconds() &&
672672
req.RequireActiveVersion == template.RequireActiveVersion &&
673673
(deprecationMessage == template.Deprecated) &&
674-
maxPortShareLevel == template.MaxPortShareLevel {
674+
maxPortShareLevel == template.MaxPortSharingLevel {
675675
return nil
676676
}
677677

@@ -911,6 +911,6 @@ func (api *API) convertTemplate(
911911
RequireActiveVersion: templateAccessControl.RequireActiveVersion,
912912
Deprecated: templateAccessControl.IsDeprecated(),
913913
DeprecationMessage: templateAccessControl.Deprecated,
914-
MaxPortShareLevel: template.MaxPortShareLevel,
914+
MaxPortShareLevel: template.MaxPortSharingLevel,
915915
}
916916
}

coderd/workspaceportshare.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ func (api *API) postWorkspaceAgentPortShare(rw http.ResponseWriter, r *http.Requ
4444
return
4545
}
4646

47-
if req.ShareLevel > codersdk.WorkspaceAgentPortShareLevel(template.MaxPortShareLevel) {
47+
if req.ShareLevel > codersdk.WorkspaceAgentPortShareLevel(template.MaxPortSharingLevel) {
4848
httpapi.Write(ctx, rw, http.StatusBadRequest, codersdk.Response{
49-
Message: fmt.Sprintf("Port sharing level not allowed. Must not be greater than %d.", template.MaxPortShareLevel),
49+
Message: fmt.Sprintf("Port sharing level not allowed. Must not be greater than %d.", template.MaxPortSharingLevel),
5050
})
5151
return
5252
}

docs/api/portsharing.md

+5-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/api/schemas.md

+21-21
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

site/src/api/typesGenerated.ts

+7-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)