Skip to content

Conversation

@smita-samanta
Copy link

Made changes to routes and index.js

Copy link
Member

@Alex-Aralis Alex-Aralis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will all need to be updated after changes to the Review model.

// processed routes.
root.use('/test', testRouter);
root.use('/user', userRouter);
root.use('/user', reviewRouter);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change to root.use('/review', reviewRouter);

.then(tutor => new Review({
tutor: tutor._id,
learner: learner._id,
$push: {userRating: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don't need to push like this on model creation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants