mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core&ui: update renderer interface
This commit is contained in:
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),
|
||||
})));
|
||||
|
||||
Reference in new issue
Block a user