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?