Skip to content

Commit 76a490e

Browse files
committed
authzquery: workspace: fix GetWorkspaceAppByAgentIDAndSlug and GetWorkspaceAppsByAgentID
1 parent 21d0f97 commit 76a490e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

coderd/authzquery/workspace.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,12 @@ func (q *AuthzQuerier) UpdateWorkspaceAgentLifecycleStateByID(ctx context.Contex
109109

110110
func (q *AuthzQuerier) GetWorkspaceAppByAgentIDAndSlug(ctx context.Context, arg database.GetWorkspaceAppByAgentIDAndSlugParams) (database.WorkspaceApp, error) {
111111
// If we can fetch the workspace, we can fetch the apps. Use the authorized call.
112-
_, err := q.GetWorkspaceByID(ctx, arg.AgentID)
112+
_, err := q.GetWorkspaceByAgentID(ctx, arg.AgentID)
113113
if err != nil {
114114
return database.WorkspaceApp{}, err
115115
}
116116

117-
return q.GetWorkspaceAppByAgentIDAndSlug(ctx, arg)
117+
return q.database.GetWorkspaceAppByAgentIDAndSlug(ctx, arg)
118118
}
119119

120120
func (q *AuthzQuerier) GetWorkspaceAppsByAgentID(ctx context.Context, agentID uuid.UUID) ([]database.WorkspaceApp, error) {
@@ -266,7 +266,7 @@ func (q *AuthzQuerier) GetWorkspaceResourcesByJobID(ctx context.Context, jobID u
266266
if err != nil {
267267
return nil, nil
268268
}
269-
return q.GetWorkspaceResourcesByJobID(ctx, jobID)
269+
return q.database.GetWorkspaceResourcesByJobID(ctx, jobID)
270270
}
271271

272272
// GetWorkspaceResourcesByJobIDs is an all or nothing call. If a single resource is not authorized, then

0 commit comments

Comments
 (0)