diff --git a/frontend/src/routes/email/+server.ts b/frontend/src/routes/email/+server.ts index 9875a7111..92ba52b03 100644 --- a/frontend/src/routes/email/+server.ts +++ b/frontend/src/routes/email/+server.ts @@ -6,10 +6,9 @@ import type {Component} from 'svelte'; export async function POST(event: RequestEvent): Promise { const request = await event.request.json() as EmailTemplateProps; - const {...props} = request; - const component = componentMap[props.template] as unknown as Component; - if (!component) throw new Error(`Invalid email template ${props.template}.}`); - return json(render(component, props, event.locals.activeLocale)); + const component = componentMap[request.template] as unknown as Component; + if (!component) throw new Error(`Invalid email template ${request.template}.}`); + return json(render(component, request, event.locals.activeLocale)); }