8000 refactor: Return template version name in the workspace build API by BrunoQuaresma · Pull Request #5178 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

refactor: Return template version name in the workspace build API #5178

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Nov 28, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix query verbiage
  • Loading branch information
BrunoQuaresma committed Nov 28, 2022
commit 556aa05c53f470f30987fa727ac1fc1ee0e3526a
2 changes: 1 addition & 1 deletion coderd/database/querier.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

84 changes: 42 additions & 42 deletions coderd/database/queries.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion coderd/database/queries/templateversions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ FROM
WHERE
id = $1;

-- name: GetTemplateVersionByIDs :many
-- name: GetTemplateVersionsByIDs :many
SELECT
*
FROM
Expand Down
2 changes: 1 addition & 1 deletion coderd/workspacebuilds.go
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ func (api *API) workspaceBuildsData(ctx context.Context, workspaces []database.W
for _, build := range workspaceBuilds {
jobIDs = append(templateVersionIDs, build.TemplateVersionID)
}
templateVersions, err := api.Database.GetTemplateVersionByIDs(ctx, templateVersionIDs)
templateVersions, err := api.Database.GetTemplateVersionsByIDs(ctx, templateVersionIDs)
if err != nil && !errors.Is(err, sql.ErrNoRows) {
return workspaceBuildsData{}, xerrors.Errorf("get template versions: %w", err)
}
Expand Down
0