ES

@core / newsletter

1.1.0 ▾
verificadoMIT
GitHub

Newsletter: doble opt-in, baja en un clic (RFC 8058), etiquetas y campañas con texto enriquecido en lotes reanudables

Código11 archivosContexto~889 tokensescaneo superado

El árbol exacto que se inyectará, tras aplicar .genpmignore. Anclado a

src/lib/newsletter/adapters/hono.tssolo lectura · 48a34fe
// Adaptador Hono: `app.route('/newsletter', newsletterRoutes())`.
import { Hono } from 'hono';
import { handleConfirm, handleSubscribe, handleUnsubscribe, type NewsletterPages, type NewsletterPageTexts } from './http.ts';

export function newsletterRoutes(opts: { pages?: Partial<NewsletterPages>; texts?: Partial<NewsletterPageTexts>; tags?: string[] } = {}) {
  return new Hono()
    .post('/subscribe', (c) => handleSubscribe(c.req.raw, { tags: opts.tags }))
    .get('/confirm', (c) => handleConfirm(c.req.raw, opts.pages, opts.texts))
    .post('/confirm', (c) => handleConfirm(c.req.raw, opts.pages, opts.texts))
    .get('/unsubscribe', (c) => handleUnsubscribe(c.req.raw, opts.pages, opts.texts))
    .post('/unsubscribe', (c) => handleUnsubscribe(c.req.raw, opts.pages, opts.texts));
}

Reportar @core/newsletter

Inicia sesión con GitHub para reportar un paquete.