CGUC / skybunk-server

The back-end application for Conrad Grebel University College students to stay connected
3 stars 9 forks source link

Changed user.info to not be a schema #87

Closed scholvat closed 5 years ago

scholvat commented 5 years ago

There is a weird bug where if a user updates only one field of their info, then the rest of the fields will get deleted. This is because Mongoose is doing weird things when trying to update a subdocument (this.info=updatedUserData.info in User.js). Making it a dictionary should solve this, and since its a 1 to 1 relation a separate schema is not needed.

picklechips commented 5 years ago

Interesting, not sure why info was a schema in the first place - this makes more sense. I'm going to test this before approving, but looks good.

scholvat commented 5 years ago

Ok, feel free to merge yourself once you’ve tested it.

On Mon, May 6, 2019 at 2:15 PM Ryan Martin notifications@github.com wrote:

Interesting, not sure why info was a schema in the first place - this makes more sense. I'm going to test this before approving, but looks good.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/CGUC/skybunk-server/pull/87#issuecomment-489720488, or mute the thread https://github.com/notifications/unsubscribe-auth/ACNK45QLCOYX3KMKPTFAI63PUBYTHANCNFSM4HKWCYHQ .