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

Function resolveCredentialAccountUserId

apps/sim/background/webhook-execution.ts:305–316  ·  view source on GitHub ↗
(credentialId: string)

Source from the content-addressed store, hash-verified

303}
304
305async function resolveCredentialAccountUserId(credentialId: string): Promise<string | undefined> {
306 const resolved = await resolveOAuthAccountId(credentialId)
307 if (!resolved) {
308 return undefined
309 }
310 const [credentialRecord] = await db
311 .select({ userId: account.userId })
312 .from(account)
313 .where(eq(account.id, resolved.accountId))
314 .limit(1)
315 return credentialRecord?.userId
316}
317
318/**
319 * Handle execution result status (timeout, pause, resume).

Callers 1

Calls 2

resolveOAuthAccountIdFunction · 0.90
eqFunction · 0.50

Tested by

no test coverage detected