core: dump UiContext & UserContext

This commit is contained in:
undefined committed 2021-06-29 19:25:43 +08:00
1 parent 900cce3614
commit a33708cd21
2 files changed
+5 -1

No files matched your search

+4
View File
@@ -558,6 +558,10 @@ export class Handler extends HandlerCommon {
this.request.json || this.response.redirect
|| this.request.query.noTemplate || !this.response.template) {
try {
if (typeof this.response.body === 'object') {
this.response.body.UiContext = this.UiContext;
this.response.body.UserContext = this.user;
}
this.response.body = JSON.stringify(this.response.body, serializer);
} catch (e) {
this.response.body = new SystemError('Serialize failure', e.message);