core&ui: update renderer interface

This commit is contained in:
undefined committed 2023-12-31 05:31:40 +08:00
1 parent 396a446937
commit 08839fa0ea
4 files changed
+45 -46

No files matched your search

@@ -14,7 +14,8 @@ export default (router, logger) => async (ctx: KoaContext, next) => {
avatar: avatar(user?.avatar || '', 128),
viewLang: ctx.translate('__id'),
};
const engine = global.Hydro.lib.template?.render
const type = templateName.split('.')[1];
const engine = global.Hydro.module.render[type]
|| (() => JSON.stringify(args, serializer({
showDisplayName: user?.hasPerm(PERM.PERM_VIEW_DISPLAYNAME),
})));