(ctx context.Context, arg database.UpsertWorkspaceAgentPortShareParams)
| 8374 | } |
| 8375 | |
| 8376 | func (q *querier) UpsertWorkspaceAgentPortShare(ctx context.Context, arg database.UpsertWorkspaceAgentPortShareParams) (database.WorkspaceAgentPortShare, error) { |
| 8377 | workspace, err := q.db.GetWorkspaceByID(ctx, arg.WorkspaceID) |
| 8378 | if err != nil { |
| 8379 | return database.WorkspaceAgentPortShare{}, err |
| 8380 | } |
| 8381 | |
| 8382 | err = q.authorizeContext(ctx, policy.ActionUpdate, workspace) |
| 8383 | if err != nil { |
| 8384 | return database.WorkspaceAgentPortShare{}, err |
| 8385 | } |
| 8386 | |
| 8387 | return q.db.UpsertWorkspaceAgentPortShare(ctx, arg) |
| 8388 | } |
| 8389 | |
| 8390 | func (q *querier) UpsertWorkspaceApp(ctx context.Context, arg database.UpsertWorkspaceAppParams) (database.WorkspaceApp, error) { |
| 8391 | // NOTE(DanielleMaywood): |
nothing calls this directly
no test coverage detected