Skip to content

Extend User model #4

@JensWinter

Description

@JensWinter

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 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions