Add mail template, mail HTML generation and a few UI fixes

This commit is contained in:
2024-11-25 17:37:43 +01:00
parent d71e8b7910
commit 4df9297d47
12 changed files with 171 additions and 20 deletions

View File

@@ -1,5 +1,13 @@
import { hasPermissions } from "#shared/auth.util";
declare module 'nitropack'
{
interface TaskPayload
{
type: string
}
}
export default defineEventHandler(async (e) => {
const session = await getUserSession(e);
@@ -16,6 +24,9 @@ export default defineEventHandler(async (e) => {
setResponseStatus(e, 400);
return;
}
payload.type = id;
payload.data = JSON.parse(payload.data);
const result = await runTask(id, {
payload: payload