@webtypen/webframez-core 0.2.3 → 0.2.4
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.
|
@@ -340,8 +340,9 @@ class DataBuilder {
|
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
let redirect = undefined;
|
|
343
|
-
|
|
344
|
-
|
|
343
|
+
const forms = typeof type.forms === "function" ? yield type.forms(req) : type.forms;
|
|
344
|
+
if (forms && forms.main && forms.main.onSaveRedirect && typeof forms.main.onSaveRedirect === "function") {
|
|
345
|
+
redirect = yield forms.main.onSaveRedirect(element, req);
|
|
345
346
|
}
|
|
346
347
|
return {
|
|
347
348
|
status: "success",
|
package/package.json
CHANGED
|
@@ -419,8 +419,9 @@ export class DataBuilder {
|
|
|
419
419
|
}
|
|
420
420
|
|
|
421
421
|
let redirect: any = undefined;
|
|
422
|
-
|
|
423
|
-
|
|
422
|
+
const forms = typeof type.forms === "function" ? await type.forms(req) : type.forms;
|
|
423
|
+
if (forms && forms.main && forms.main.onSaveRedirect && typeof forms.main.onSaveRedirect === "function") {
|
|
424
|
+
redirect = await forms.main.onSaveRedirect(element, req);
|
|
424
425
|
}
|
|
425
426
|
|
|
426
427
|
return {
|