-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
backend: created user model and authMiddleware #71
backend: created user model and authMiddleware #71
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@sethdivyansh The implementation seems alright! |
9f0b198
to
9e34b69
Compare
@kuv2707 I have not tested the authMiddleware yet. I'm unsure how to do so without involving the user controller. However, I have written a test for the user model in user.model.ts. |
9e34b69
to
2b63931
Compare
backend/tests/userModel.test.ts
Outdated
|
||
dotenv.config(); | ||
|
||
describe('insert user', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would need setting up mongodb in github actions. I'll do it in a while.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've add a mongodb server in the jest testing workflow, which starts a server at localhost:27017
. Update this accordingly.
2b63931
to
584ec25
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Posted some minor comments.
It can be merged once these comments are addressed.
.DS_Store
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add this to .gitignore
.
backend/tests/userModel.test.ts
Outdated
|
||
dotenv.config(); | ||
|
||
describe('insert user', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've add a mongodb server in the jest testing workflow, which starts a server at localhost:27017
. Update this accordingly.
4dd6ce4
to
7bc3d56
Compare
584ec25
to
a1ece7f
Compare
a1ece7f
to
1430659
Compare
1430659
to
275b35e
Compare
Fixes: #62
Description
added:
Checklist
Test Screenshots
Register
Login