From 5c3814d0162535d8f5b9e907ed9a25aa263c2eff Mon Sep 17 00:00:00 2001 From: Scott Gress Date: Wed, 30 Nov 2016 11:50:29 -0600 Subject: [PATCH] Remove update-via-POST blueprint route This was originally added in https://github.com/balderdashy/sails/pull/1733 but has ended up causing some confusion. You can still use Angular $resource (just make a custom `update` action), and you can also create per-model routes via `'POST /user/:id': { action: 'user/update', model: 'user' }` --- lib/hooks/blueprints/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/hooks/blueprints/index.js b/lib/hooks/blueprints/index.js index 6119e00d7..92192a26b 100644 --- a/lib/hooks/blueprints/index.js +++ b/lib/hooks/blueprints/index.js @@ -323,7 +323,6 @@ module.exports = function(sails) { _bindRestRoute('get %s/:id', 'findOne'); _bindRestRoute('post %s', 'create'); _bindRestRoute('put %s/:id', 'update'); - _bindRestRoute('post %s/:id', 'update'); _bindRestRoute('delete %s/:id?', 'destroy'); // Bind "rest" blueprint/shadow routes based on known associations in our model's schema