Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

usiamo le specifiche di REST nel controller #173

Open
paolini opened this issue Sep 9, 2023 · 0 comments
Open

usiamo le specifiche di REST nel controller #173

paolini opened this issue Sep 9, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@paolini
Copy link
Collaborator

paolini commented Sep 9, 2023

Stavo guardando il codice di router.js qui: https://github.com/Unipisa/caps/blob/caps-api/api/router.js

Mi pare che sarebbe meglio utilizzare il metodo DELETE (router.delete) per cancellare gli oggetti, invece che mettere delete nel path con il metodo POST.

Analogamente userei il metodo PATCH invece che POST per fare l'update. Il metodo POST dovrebbe servire solamente ad inserire un oggetto nuovo.

Per coerenza rinominerei i metodi dei controller: insert->post, update->patch.

@paolini paolini added the enhancement New feature or request label Sep 9, 2023
@paolini paolini assigned Fran314 and paolini and unassigned Fran314 Sep 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants