Thursday, 18 June 2020

Can't figure out how to get/post/delete data that has ObjectId type.

I'm trying to make multi-user to-do app using Node, Mongoose and Express. I can't figure out how to get/post/delete todo items for specific user.I made schemas for both user and todos. User schema contains: items: [{ type: mongoose.Schema.Types.ObjectId, ref: 'Todos' }]. When Todos schema contains reference to user: user: {type: mongoose.Schema.Types.ObjectId, ref: 'User'}.Would be great if anyone could explain me how to this:)

Submitted June 18, 2020 at 01:34PM by Silly-Society2278

No comments:

Post a Comment