api: reads use POST and deletes take ids in the request body

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

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
45/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
express, javascript, mongodb, react

Línea de trabajo

Start by locating the existing course detail and delete routes, then find the UI calls that use them. Check how the section and subsection delete routes pass IDs and how the project tests its API. Done means the new RESTful routes are used by the UI, the old routes are marked deprecated with a date, and coverage verifies the new behavior.

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

Descripción

enhancement

Several routes do not follow HTTP semantics:

  • POST /api/v1/course/getCourseDetails and POST /getFullCourseDetails read data with POST, so the responses cannot be cached or linked to.
  • DELETE /api/v1/course/deleteCourse and the section/subsection delete routes take the id from the request body (some proxies and clients drop DELETE bodies).

Suggested fix: add RESTful routes such as GET /api/v1/courses/:courseId and DELETE /api/v1/courses/:courseId next to the existing ones, move the UI to them, mark the old routes deprecated (a Deprecation header and a date), and remove them later.


Found while reviewing StudyNotion with Claude Code.

Lenguaje dominante
JavaScript
Estrellas
23
Forks
8
Merge medio
11 min
PR fusionados (30 d)
4

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 khemssharma/StudyNotion

Todos los issues de khemssharma/StudyNotion

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.