@nextlyhq/plugin-form-builder 0.0.2-alpha.50 → 0.0.2-alpha.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/admin/index.js +105 -91
- package/dist/admin/index.js.map +1 -1
- package/dist/index.js +14 -2
- package/dist/index.js.map +1 -1
- package/package.json +14 -10
package/dist/index.js
CHANGED
|
@@ -2005,16 +2005,28 @@ async function submitForm(options, context) {
|
|
|
2005
2005
|
);
|
|
2006
2006
|
logger.info?.("Form submission created successfully", {
|
|
2007
2007
|
formSlug,
|
|
2008
|
-
submissionId: submission.id,
|
|
2008
|
+
submissionId: submission.item.id,
|
|
2009
2009
|
flaggedAsSpam: isContentSpam
|
|
2010
2010
|
});
|
|
2011
|
+
if (submission.warnings) {
|
|
2012
|
+
logger.warn?.("Form submission side effects failed", {
|
|
2013
|
+
formSlug,
|
|
2014
|
+
submissionId: submission.item.id,
|
|
2015
|
+
warnings: submission.warnings
|
|
2016
|
+
});
|
|
2017
|
+
}
|
|
2011
2018
|
const redirect = determineRedirectUrl(form);
|
|
2012
2019
|
if (isContentSpam) {
|
|
2013
2020
|
return { success: true, redirect };
|
|
2014
2021
|
}
|
|
2015
2022
|
return {
|
|
2016
2023
|
success: true,
|
|
2017
|
-
|
|
2024
|
+
// The created ROW, not the envelope around it. The service's loose
|
|
2025
|
+
// `CollectionEntry` and this declared document do not overlap enough for
|
|
2026
|
+
// a checked assertion, so the conversion goes through `unknown` and
|
|
2027
|
+
// TypeScript verifies nothing here — which is why the integration test
|
|
2028
|
+
// reads `submission.id` off the result rather than only `success`.
|
|
2029
|
+
submission: submission.item,
|
|
2018
2030
|
redirect
|
|
2019
2031
|
};
|
|
2020
2032
|
} catch (error) {
|