Skip to content

The open alternative to Salesforce, designed for AI.

409 B
Raw Blame
export const removeSecretFromWebhookRecord = (
  // oxlint-disable-next-line typescript/no-explicit-any
  record: Record<string, any> | undefined,
  isWebhookEvent: boolean,
  // oxlint-disable-next-line typescript/no-explicit-any
): Record<string, any> | undefined => {
  if (!isWebhookEvent || !record) return record;

  const { secret: _secret, ...sanitizedRecord } = record;

  return sanitizedRecord;
};