Skip to content

Commit e3b62be

Browse files
committed
fix: always return number of workspaces
1 parent eba8cd7 commit e3b62be

File tree

4 files changed

+122
-477
lines changed

4 files changed

+122
-477
lines changed

coderd/database/modelqueries.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,9 @@ func (q *sqlQuerier) GetAuthorizedWorkspaces(ctx context.Context, arg GetWorkspa
215215
// The name comment is for metric tracking
216216
query := fmt.Sprintf("-- name: GetAuthorizedWorkspaces :many\n%s", filtered)
217217
rows, err := q.db.QueryContext(ctx, query,
218+
arg.RequesterID,
219+
arg.Offset,
220+
arg.Limit,
218221
arg.Deleted,
219222
arg.Status,
220223
arg.OwnerID,
@@ -228,9 +231,6 @@ func (q *sqlQuerier) GetAuthorizedWorkspaces(ctx context.Context, arg GetWorkspa
228231
arg.LastUsedBefore,
229232
arg.LastUsedAfter,
230233
arg.UsingActive,
231-
arg.RequesterID,
232-
arg.Offset,
233-
arg.Limit,
234234
)
235235
if err != nil {
236236
return nil, err
@@ -258,6 +258,11 @@ func (q *sqlQuerier) GetAuthorizedWorkspaces(ctx context.Context, arg GetWorkspa
258258
&i.TemplateName,
259259
&i.TemplateVersionID,
260260
&i.TemplateVersionName,
261+
&i.Username,
262+
&i.LatestBuildCompletedAt,
263+
&i.LatestBuildCanceledAt,
264+
&i.LatestBuildError,
265+
&i.LatestBuildTransition,
261266
&i.Count,
262267
); err != nil {
263268
return nil, err

0 commit comments

Comments
 (0)