Skip to content

plugins.js:2 TypeError: Cannot read property 'next' of undefined #7

Open
@stefensuhat

Description

@stefensuhat

Hi,

I always get those error when setup the middleware. here is my code:

 $middlewareProvider.map({ 

            'check-token': ['Auth', (Auth) => {
                const request = this;
                Auth.get({ url: 'check-token' }, response => {
                    if (response) {
                        return request.next();
                    }
                });
            }]
        });

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions