Skip to content

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