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

Fix edit version modal in admin panel #361

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

esdandreu
Copy link

@esdandreu esdandreu commented Feb 9, 2024

The edit version modal in the admin panel is buggy. It will send a POST request to update an existing Version but that will fail. It should send a PATCH request.

For example, with rest enabled, having a Boat model in your app generates the following routes:

GET /boat -> find boats matching criteria provided on the query string, using the find blueprint.
GET /boat/:id -> find a single boat with the given unique ID (i.e. primary key) value, using the findOne blueprint.
POST /boat -> create a new boat with the attributes provided in the request body, using the create blueprint.
PATCH /boat/:id -> update the boat with the given unique ID with the attributes provided in the request body, using the update blueprint.
DELETE /boat/:id -> destroy the boat with the given unique ID, using the destroy blueprint.

Source https://sailsjs.com/documentation/concepts/blueprints/blueprint-routes

@esdandreu esdandreu changed the title Debug edit version modal Fix edit version modal in admin panel Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants