Hello there,
I can't manage to extend the user model. I want to add a remote method "loginWithFacebook" but it doesn't show up in explorer. I used the Tweet model from https://github.com/belibasakis/loopback-example-ionic and its greet method as a template. But there has to be something different, as it still does not work.
module.exports = function (User) {
User.loginWithFacebook = function (cb) {
cb(null, 'Login with Facebook');
};
User.remoteMethod(
'loginWithFacebook',
{
http: {verb: 'post'}
}
);
};
Any clues here?
Thanks in advance,
Jens
"User": {
"dataSource": "mainDb",
"public": false
},
"user": {
"dataSource": "mainDb",
"public": true
},
{
"name": "user",
"base": "User",
"idInjection": true,
...
}