mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 17:46:28 +08:00
core&ui: fix typo
This commit is contained in:
8 files changed
+11
-11
No files matched your search
@@ -16,7 +16,7 @@ export default (router, logger) => async (ctx: KoaContext, next) => {
|
||||
};
|
||||
const engine = global.Hydro.lib.template?.render
|
||||
|| (() => JSON.stringify(args, serializer({
|
||||
showDisplayName: user?.hasPerm(PERM.PREM_VIEW_DISPLAYNAME),
|
||||
showDisplayName: user?.hasPerm(PERM.PERM_VIEW_DISPLAYNAME),
|
||||
})));
|
||||
return engine(templateName, {
|
||||
handler: ctx.handler,
|
||||
|
||||
@@ -27,7 +27,7 @@ export default (logger) => async (ctx: KoaContext, next) => {
|
||||
response.body.UiContext = UiContext;
|
||||
response.body.UserContext = user;
|
||||
}
|
||||
response.body = JSON.stringify(response.body, serializer({ showDisplayName: user?.hasPerm(PERM.PREM_VIEW_DISPLAYNAME) }));
|
||||
response.body = JSON.stringify(response.body, serializer({ showDisplayName: user?.hasPerm(PERM.PERM_VIEW_DISPLAYNAME) }));
|
||||
} catch (e) {
|
||||
response.body = new SystemError('Serialize failure', e.message);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user