node-js-jwt-auth icon indicating copy to clipboard operation
node-js-jwt-auth copied to clipboard

Unhandled rejection typeerror: user.setRoles is not a function

Open jetro4u opened this issue 4 years ago • 2 comments

Unhandled rejection typeerror: user.setRoles is not a function in the controller/auth.controller.js file.

The function setRoles in line 28 and getRoles in line 72 is not defined in the user model. Or is there another file where it is ommitted?

jetro4u avatar Apr 16 '20 05:04 jetro4u

We configure many-to-many relationship in app/models/index.js.

bezkoder avatar Apr 18 '20 02:04 bezkoder

ok

jetro4u avatar Apr 24 '20 21:04 jetro4u