Skip to content
This repository has been archived by the owner on Sep 20, 2020. It is now read-only.

Issue #27 - update router.js #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Issue #27 - update router.js #32

wants to merge 1 commit into from

Conversation

mashuDuek
Copy link

Makes use of ES6 and cleans up some of the logic for '/signin' route

@restyled-io
Copy link

restyled-io bot commented Sep 1, 2019

Hey there-

I'm a bot, here to let you know that some code in this PR might not
match the team's automated styling. I ran the team's auto-reformatting tools on
the files changed in this PR and found some differences. Those differences can
be seen in #33.

Please see that Pull Request's description for more details.

@Purukitto Purukitto changed the title Issue #27 - refactor router.js Issue #27 - update router.js Sep 5, 2019
ph : req.body.ph,
})
name, username, email, password, ph
});
Copy link
Collaborator

Choose a reason for hiding this comment

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

@mashuDuek Can you provide any relevant materials showing that the schema constructor supports this method of initialization i.e. without key-value pairs?

Because as far as the mongoose documentation and other relevant online resources go, they all seem to adhere to this key-value scheme.

Also, chances are schema constructors don't support self-resolution i.e. they need key-value pairs .

Feel free to drop any relevant resources/code

Copy link
Author

@mashuDuek mashuDuek Sep 5, 2019

Choose a reason for hiding this comment

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

Having a rough time finding an example that uses ES6 syntax object creation to instantiate a mongoose model.

What is passed is as an argument to new users is the same thing it was before, it shouldn't have changed functionality. MDN Object Initializer

Screen Shot

Copy link
Author

Choose a reason for hiding this comment

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

Was this not good enough documentation on this?

@TantumErgo
Copy link

@Purukitto @pranjaldatta Didn't #27 say that the file must be no longer than 15 lines of code?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants