Reputation: 1732
I haven't managed to hide API methods in LoopBack 2.0.
According to the documentation, I should achieve this with something like:
var app = require('../app');
var Location = app.models.Location;
Location.deleteById.shared = false;
Howver, this doesn't seem to work.
Also, console.log(Location.deleteById)
prints:
[Function]
If deleteById
is a function and not an object, then the assignment to the shared
property makes no sense. No surprise then, that console.log(Location.deleteById.shared)
prints:
undefined
Any clues, anybody?
Upvotes: 1
Views: 2596
Reputation: 31
You should see the new documentation,
this works for me,
MyModel.disableRemoteMethod('deleteById', true);
Upvotes: 2