Add dynamic text compiling and dynamic children list rendering on DOM.

This commit is contained in:
Clément Pons
2025-12-08 17:41:39 +01:00
parent b1229f81f6
commit 6f5566326e
20 changed files with 1500 additions and 312 deletions

View File

@@ -3,7 +3,6 @@ import { eq, or } from 'drizzle-orm';
import { z } from 'zod/v4';
import useDatabase from '~/composables/useDatabase';
import { usersTable } from '~/db/schema';
import sendMail from '~/../server/tasks/mail';
const schema = z.object({
profile: z.string(),
@@ -33,7 +32,7 @@ export default defineEventHandler(async (e) => {
id, timestamp,
}
});
await sendMail({
await runTask('mail', {
payload: {
type: 'mail',
data: {

View File

@@ -5,7 +5,6 @@ import { usersDataTable, usersTable } from '~/db/schema';
import { schema } from '~/schemas/registration';
import { checkSession, logSession } from '~/../server/utils/user';
import type { UserSession, UserSessionRequired } from '~/types/auth';
import sendMail from '~/../server/tasks/mail';
import type { $ZodIssue } from 'zod/v4/core';
interface SuccessHandler
@@ -75,7 +74,7 @@ export default defineEventHandler(async (e): Promise<Return> => {
logSession(e, await setUserSession(e, { user: { id: id.id, username: body.data.username, email: body.data.email, state: 0, signin: new Date(), permissions: [], lastTimestamp: new Date() } }) as UserSessionRequired);
await sendMail({
await runTask('mail', {
payload: {
type: 'mail',
to: [body.data.email],