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

Aperta
#58 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
express, javascript, mongodb, react

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
JavaScript
Stelle
23
Fork
8
Merge medio
11m
PR unite (30g)
4

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di khemssharma/StudyNotion

Tutte le issue di khemssharma/StudyNotion

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.