mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat(site): display version message (#8435)
This commit is contained in:
@@ -4771,6 +4771,7 @@ func (q *FakeQuerier) UpdateTemplateVersionByID(_ context.Context, arg database.
|
||||
templateVersion.TemplateID = arg.TemplateID
|
||||
templateVersion.UpdatedAt = arg.UpdatedAt
|
||||
templateVersion.Name = arg.Name
|
||||
templateVersion.Message = arg.Message
|
||||
q.templateVersions[index] = templateVersion
|
||||
return templateVersion, nil
|
||||
}
|
||||
|
||||
@@ -4688,7 +4688,8 @@ UPDATE
|
||||
SET
|
||||
template_id = $2,
|
||||
updated_at = $3,
|
||||
name = $4
|
||||
name = $4,
|
||||
message = $5
|
||||
WHERE
|
||||
id = $1 RETURNING id, template_id, organization_id, created_at, updated_at, name, readme, job_id, created_by, git_auth_providers, message
|
||||
`
|
||||
@@ -4698,6 +4699,7 @@ type UpdateTemplateVersionByIDParams struct {
|
||||
TemplateID uuid.NullUUID `db:"template_id" json:"template_id"`
|
||||
UpdatedAt time.Time `db:"updated_at" json:"updated_at"`
|
||||
Name string `db:"name" json:"name"`
|
||||
Message string `db:"message" json:"message"`
|
||||
}
|
||||
|
||||
func (q *sqlQuerier) UpdateTemplateVersionByID(ctx context.Context, arg UpdateTemplateVersionByIDParams) (TemplateVersion, error) {
|
||||
@@ -4706,6 +4708,7 @@ func (q *sqlQuerier) UpdateTemplateVersionByID(ctx context.Context, arg UpdateTe
|
||||
arg.TemplateID,
|
||||
arg.UpdatedAt,
|
||||
arg.Name,
|
||||
arg.Message,
|
||||
)
|
||||
var i TemplateVersion
|
||||
err := row.Scan(
|
||||
|
||||
@@ -91,7 +91,8 @@ UPDATE
|
||||
SET
|
||||
template_id = $2,
|
||||
updated_at = $3,
|
||||
name = $4
|
||||
name = $4,
|
||||
message = $5
|
||||
WHERE
|
||||
id = $1 RETURNING *;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user