Purge: refuse to purge a live post without confirmation

Abierto
#8 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
62/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
markdown, sqlite, typescript
Área
backend, content

Línea de trabajo

Start with purgePost in src/lib/server/content.ts, which deletes a post's rows, and check how the publish step decides what leaves the site. Add a guard that refuses to purge a live post unless it is unpublished or a confirmation is passed. The check goes in src/lib/server/content.check.ts: a live post without confirmation is refused, and a draft purges normally. Done when that check passes and the confirmation text says the page disappears at the next publish.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Context

purgePost in src/lib/server/content.ts removes a post's rows. When the post is live, the next publish removes it from the site with no status check, so one stray click can unpublish a page.

Scope

  • Purging a live post requires it to be unpublished first, or an explicit second confirmation that names the consequence.
  • The Publish view lists posts that will be removed from the site.

Acceptance criteria

  • A check in src/lib/server/content.check.ts: purging a live post without confirmation is refused; purging a draft works.
  • The confirmation text states that the page disappears from the site at the next publish.

Estimate: about 2 hours.

Lenguaje dominante
HTML
Estrellas
0
Forks
0
Merge medio
1 min
PR fusionados (30 d)
2

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de mrgnw/cfcms

Todos los issues de mrgnw/cfcms

Issues similares

Más issues de Backend & API Design

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.