electron-release-server icon indicating copy to clipboard operation
electron-release-server copied to clipboard

Fix edit version modal in admin panel

Open esdandreu opened this issue 1 year ago • 0 comments

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 avatar Feb 09 '24 13:02 esdandreu