ES

@core / comments

1.0.1 ▾
verificadoMIT
GitHub

Comentarios moderados sobre cualquier entidad: invitado o usuario, respuestas, valoración 1–5, bloqueos, RGPD y HTML seguro

Código9 archivosContexto~552 tokensescaneo superado

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

src/lib/comments/adapters/hono.tssolo lectura · 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));
}

Reportar @core/comments

Inicia sesión con GitHub para reportar un paquete.