JA
ベータ版の翻訳

@core / newsletter

1.1.0 ▾
認証済みMIT
GitHub

ニュースレター:ダブルオプトイン、ワンクリック配信停止(RFC 8058)、タグ、再開可能なバッチ配信

コード11 ファイルコンテキスト約 889 トークンスキャン合格

.genpmignore 適用後に組み込まれる正確なツリーです。固定先:

src/lib/newsletter/adapters/hono.ts読み取り専用 · 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));
}

@core/newsletter を報告

パッケージを報告するには GitHub でログインしてください。

GitHub で続ける