MCPcopy Index your code
hub / github.com/simstudioai/sim / deleteWorkspaceEnvCredentials

Function deleteWorkspaceEnvCredentials

apps/sim/lib/credentials/environment.ts:316–333  ·  view source on GitHub ↗
(params: {
  workspaceId: string
  removedKeys: string[]
})

Source from the content-addressed store, hash-verified

314 * Use this instead of `syncWorkspaceEnvCredentials` when the caller knows exactly which keys were deleted.
315 */
316export async function deleteWorkspaceEnvCredentials(params: {
317 workspaceId: string
318 removedKeys: string[]
319}): Promise<void> {
320 const { workspaceId, removedKeys } = params
321 const keys = removedKeys.filter(Boolean)
322 if (keys.length === 0) return
323
324 await db
325 .delete(credential)
326 .where(
327 and(
328 eq(credential.workspaceId, workspaceId),
329 eq(credential.type, 'env_workspace'),
330 inArray(credential.envKey, keys)
331 )
332 )
333}
334
335export async function syncPersonalEnvCredentialsForUser(params: {
336 userId: string

Callers 2

performDeleteCredentialFunction · 0.90
route.tsFile · 0.90

Calls 2

deleteMethod · 0.65
eqFunction · 0.50

Tested by

no test coverage detected