FR
Traduction bêta

@core / comments

1.0.1 ▾
vérifiéMIT
GitHub

Commentaires modérés sur toute entité : invité ou compte, réponses, note 1–5, bannissements, RGPD et HTML sûr

Code9 fichiersContexte~552 tokensanalyse réussie

L’arborescence exacte qui sera injectée, après .genpmignore. Épinglée à

src/lib/comments/adapters/hono.tslecture seule · abfbbe8
// Adaptador Hono: `app.route('/api/comments', commentRoutes({ currentUser }))` → GET/POST /api/comments/:type/:id
import { Hono } from 'hono';
import type { Moderation } from '../index.ts';
import { type CurrentUser, handleList, handlePost } from './http.ts';

export function commentRoutes(opts: { currentUser: CurrentUser; moderation?: Moderation }) {
  return new Hono()
    .get('/:type/:id', (c) => handleList(c.req.raw, c.req.param('type'), c.req.param('id')))
    .post('/:type/:id', (c) => handlePost(c.req.raw, c.req.param('type'), c.req.param('id'), opts));
}

Signaler @core/comments

Connectez-vous avec GitHub pour signaler un paquet.