fix: Dry run in prerender flow (#21876)
* fix dry run in queued flow * All zeros uuid
This commit is contained in:
1 parent
22f136d19b
commit
1a0ce47404
3 files changed
+24
-10
No files matched your search
@@ -177,15 +177,23 @@ const _handleResponse = async ({
|
||||
}
|
||||
} else {
|
||||
moduleLogger.debug("Dry run mode - Form response not stored and also webhooks and emails not sent");
|
||||
// Create a mock response for dry run
|
||||
dbFormResponse = {
|
||||
id: 0,
|
||||
formId: form.id,
|
||||
response,
|
||||
chosenRouteId,
|
||||
createdAt: new Date(),
|
||||
updatedAt: new Date(),
|
||||
};
|
||||
if (queueFormResponse) {
|
||||
queuedFormResponse = {
|
||||
id: "00000000-0000-0000-0000-000000000000",
|
||||
formId: form.id,
|
||||
response,
|
||||
};
|
||||
} else {
|
||||
// Create a mock response for dry run
|
||||
dbFormResponse = {
|
||||
id: 0,
|
||||
formId: form.id,
|
||||
response,
|
||||
chosenRouteId,
|
||||
createdAt: new Date(),
|
||||
updatedAt: new Date(),
|
||||
};
|
||||
}
|
||||
}
|
||||
return {
|
||||
isPreview: !!isPreview,
|
||||
|
||||
Reference in new issue
Block a user