Merge pull request #162 from strongloop/feature/fix-deleteById-remoting
Make sure 'deleteById' is used as the remote operation name
This commit is contained in:
commit
c92538143a
|
@ -897,7 +897,10 @@ DataAccessObject.remove = DataAccessObject.deleteAll = DataAccessObject.destroyA
|
||||||
* @param {Function} cb Callback called with (err)
|
* @param {Function} cb Callback called with (err)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
DataAccessObject.removeById = DataAccessObject.deleteById = DataAccessObject.destroyById = function deleteById(id, cb) {
|
// [FIXME] rfeng: This is a hack to set up 'deleteById' first so that
|
||||||
|
// 'deleteById' will be used as the name for strong-remoting to keep it backward
|
||||||
|
// compatible for angular SDK
|
||||||
|
DataAccessObject.removeById = DataAccessObject.destroyById = DataAccessObject.deleteById = function deleteById(id, cb) {
|
||||||
if (stillConnecting(this.getDataSource(), this, arguments)) return;
|
if (stillConnecting(this.getDataSource(), this, arguments)) return;
|
||||||
var Model = this;
|
var Model = this;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue