Implemented e-mail notification trigger.

This commit is contained in:
2026-07-18 00:01:18 +02:00
parent fab895b85e
commit b6408f3244
13 changed files with 4248 additions and 149 deletions

View File

@@ -0,0 +1,18 @@
import { render } from 'vike/abort';
import { listEmailTemplates } from '#/src/email-templates.js';
export default function onBeforeRender(pageContext) {
if (!pageContext.user || pageContext.user.role === 'user') {
throw render(404);
}
return {
pageContext: {
title: 'E-mail Previews',
pageProps: {
templates: listEmailTemplates(),
},
},
};
}