@webtypen/webframez-core 0.2.3 → 0.2.5
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/dist/Router/Router.js
CHANGED
|
@@ -221,7 +221,7 @@ class RouterFacade {
|
|
|
221
221
|
response.setServerResponse(res);
|
|
222
222
|
}
|
|
223
223
|
if (!route) {
|
|
224
|
-
return this.handleError(request, response, 404, "Not found ...");
|
|
224
|
+
return this.handleError(request, response, 404, "Not found '" + request.url + "' ...");
|
|
225
225
|
}
|
|
226
226
|
if (!(route.component && typeof route.component === "function") && !(route.controller && route.method_name)) {
|
|
227
227
|
return this.handleError(request, response, 404, "Missing route function ...");
|
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 {
|
package/src/Router/Router.ts
CHANGED
|
@@ -256,7 +256,7 @@ class RouterFacade {
|
|
|
256
256
|
}
|
|
257
257
|
|
|
258
258
|
if (!route) {
|
|
259
|
-
return this.handleError(request, response, 404, "Not found ...");
|
|
259
|
+
return this.handleError(request, response, 404, "Not found '" + request.url + "' ...");
|
|
260
260
|
}
|
|
261
261
|
|
|
262
262
|
if (!(route.component && typeof route.component === "function") && !(route.controller && route.method_name)) {
|