mirror of
https://github.com/simstudioai/sim.git
synced 2026-04-06 03:00:16 -04:00
fix(bill): add requestId to webhook processing (#2144)
This commit is contained in:
@@ -69,12 +69,7 @@ export async function POST(request: NextRequest, { params }: { params: Promise<{
|
||||
|
||||
let preprocessError: NextResponse | null = null
|
||||
try {
|
||||
preprocessError = await checkWebhookPreprocessing(
|
||||
foundWorkflow,
|
||||
foundWebhook,
|
||||
requestId,
|
||||
true // testMode - skips usage limits
|
||||
)
|
||||
preprocessError = await checkWebhookPreprocessing(foundWorkflow, foundWebhook, requestId)
|
||||
if (preprocessError) {
|
||||
return preprocessError
|
||||
}
|
||||
|
||||
@@ -125,12 +125,7 @@ export async function POST(
|
||||
|
||||
let preprocessError: NextResponse | null = null
|
||||
try {
|
||||
preprocessError = await checkWebhookPreprocessing(
|
||||
foundWorkflow,
|
||||
foundWebhook,
|
||||
requestId,
|
||||
false // testMode
|
||||
)
|
||||
preprocessError = await checkWebhookPreprocessing(foundWorkflow, foundWebhook, requestId)
|
||||
if (preprocessError) {
|
||||
return preprocessError
|
||||
}
|
||||
|
||||
@@ -498,8 +498,7 @@ export async function verifyProviderAuth(
|
||||
export async function checkWebhookPreprocessing(
|
||||
foundWorkflow: any,
|
||||
foundWebhook: any,
|
||||
requestId: string,
|
||||
testMode: boolean
|
||||
requestId: string
|
||||
): Promise<NextResponse | null> {
|
||||
try {
|
||||
const executionId = uuidv4()
|
||||
|
||||
Reference in New Issue
Block a user