!fixup Remove additional remoting
This commit is contained in:
parent
e724efd95f
commit
8849a4b49a
16
lib/scope.js
16
lib/scope.js
|
@ -118,12 +118,6 @@ function defineScope(cls, targetClass, name, params, methods) {
|
|||
f.apply(this[name], arguments);
|
||||
};
|
||||
|
||||
fn.shared = true;
|
||||
fn.http = {verb: 'get', path: '/' + name};
|
||||
fn.accepts = {arg: 'filter', type: 'object'};
|
||||
fn.description = 'Queries ' + name + ' of this model.';
|
||||
fn.returns = {arg: name, type: 'array', root: true};
|
||||
|
||||
cls['__get__' + name] = fn;
|
||||
|
||||
var fn_create = function () {
|
||||
|
@ -131,22 +125,12 @@ function defineScope(cls, targetClass, name, params, methods) {
|
|||
f.apply(this[name], arguments);
|
||||
};
|
||||
|
||||
fn_create.shared = true;
|
||||
fn_create.http = {verb: 'post', path: '/' + name};
|
||||
fn_create.accepts = {arg: 'data', type: 'object', http: {source: 'body'}};
|
||||
fn_create.description = 'Creates a new instance in ' + name + ' of this model.';
|
||||
fn_create.returns = {arg: 'data', type: 'object', root: true};
|
||||
|
||||
cls['__create__' + name] = fn_create;
|
||||
|
||||
var fn_delete = function () {
|
||||
var f = this[name].destroyAll;
|
||||
f.apply(this[name], arguments);
|
||||
};
|
||||
fn_delete.shared = true;
|
||||
fn_delete.http = {verb: 'delete', path: '/' + name};
|
||||
fn_delete.description = 'Deletes all ' + name + ' of this model.';
|
||||
fn_delete.returns = {arg: 'data', type: 'object', root: true};
|
||||
|
||||
cls['__delete__' + name] = fn_delete;
|
||||
|
||||
|
|
Loading…
Reference in New Issue