Skip to content

crud-001-new#9

Open
bilalAhmad69 wants to merge 12 commits into
mainfrom
revert-8-revert-7-crud-001
Open

crud-001-new#9
bilalAhmad69 wants to merge 12 commits into
mainfrom
revert-8-revert-7-crud-001

Conversation

@bilalAhmad69

@bilalAhmad69 bilalAhmad69 commented Dec 6, 2022

Copy link
Copy Markdown
Collaborator

refine code .. correct naming convention , adding archive column to user table

@bilalAhmad69

Copy link
Copy Markdown
Collaborator Author

added new code

@bilalAhmad69

Copy link
Copy Markdown
Collaborator Author

updated ignore file

@bilalAhmad69 bilalAhmad69 self-assigned this Dec 7, 2022
@bilalAhmad69 bilalAhmad69 added the Ready for Review Ready for Review label Dec 7, 2022

@waleedwaseem waleedwaseem left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@bilalAhmad69 - Few changes. Good feedback integration!

Comment thread config/environments/development.json Outdated
Comment on lines 2 to 8
"port": 4000,
"db": {
"username": "root",
"password": null,
"password": "12345678",
"name": "productbox",
"host": "127.0.0.1"
},

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@bilalAhmad69 - The file still exists.

Comment thread models/user.js Outdated
{}
);
User.associate = function (models) {
console.log("🚀 ~ file: user.js:37 ~ models", models);

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

What is the purpose of this?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

make the relation between tables. sequelize used associate function. but there is not need of this function. i forget it to remove.

Comment thread controllers/user.js
data: user.email,
});
} catch (err) {
next(err);

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

next always take it to the next function, can you explain where is the next leading to in this case?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

the function(middleware) is located in app.js . when ever we pass the err obj to next function it take to the error handler function.

Comment thread .gitignore Outdated
.tern-port

# development.josn file
.config/environments/development.json

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Suggested change
.config/environments/development.json
.config/environments/

@waleedwaseem

Copy link
Copy Markdown
Owner

@bilalAhmad69 - Good work, please review the feedback. Also fix linting.

Comment on lines +14 to +17
email: {
allowNull: false,
type: Sequelize.STRING,
},

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@bilalAhmad69 - make it unique within this migration.

Comment on lines +18 to +21
password: {
type: Sequelize.STRING,
allowNull: false,
},

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@bilalAhmad69 - encrypt this before use save it.

@waleedwaseem waleedwaseem left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Good work.

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

Labels

Ready for Review Ready for Review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants