(owner: ProfileOwner)
| 8 | * Build ownership condition for profile queries. |
| 9 | */ |
| 10 | export function buildOwnershipCondition(owner: ProfileOwner) { |
| 11 | return owner.type === 'user' |
| 12 | ? eq(agent_environment_profiles.owned_by_user_id, owner.id) |
| 13 | : eq(agent_environment_profiles.owned_by_organization_id, owner.id); |
| 14 | } |
| 15 | |
| 16 | /** |
| 17 | * Verify that a profile exists and is owned by the specified owner. |
no outgoing calls
no test coverage detected