on-internet
← Community

Error: WHERE parameter "id" has invalid "undefined" value

Stack Overflow ·

I'm making an API with Express.js and Sequelize for an appointment scheduling app. So far I have two models, User and Salon, with an N:M relationship. (So an user might manage many salons, for a franchise for example, or a salon may be managed by many employees) I have stumbled upon a problem in the PUT /salons route. My intention is that the user can fill out a form to input the details of the salon, and then the logged in user will be associated with this salon. The code for the route looks like this: router.put('/', checkLoggedIn, (req, res, next) => { const user = User.findOne({ where: { i

Comments

Sign in or sign up to comment and upvote.

No comments yet.