-
Notifications
You must be signed in to change notification settings - Fork 0
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
Manage product #62
Manage product #62
Conversation
2d1eefb
to
d6e6ead
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.
It Look good for Me!!!
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.
👍
c72e3b6
d6e6ead
to
addf31c
Compare
-define roles and permissions for vendors and buyers -assign roles and permissions to users during registration or profile update -enforce role-based access control throughout the application -write comprehensive unit tests [Delivers #34] * feat(rbac): integrate rbac into user registration -integrate role based access control into user registration [Delivers #34] * feat(rbac): integrate rbac into user registration -integrate role based access control into user registration [Delivers #34] --------- Co-authored-by: ambroisegithub <[email protected]> Social Logins (#45) * squashing commits implementing routes for auth create passport callback function adding new user from Google creating new user check if user is exist in db implementing cookie session Fix error of TypeError: req.session.regenerate is not a function using Passport fix secret keys remove Google client secret keys working on facebook strategy get email from fb login and update the scope after verification save the user into db add profile image in db fixing minor bugs fix minor bugs in codes after rebasing & updating some fts link social login with userModel Addong Google client keys & FB client key into yml send confrim email after register a new user send email after register from facebook fix minor bugs * fix minor errors * remove lints errors user register register user test register user testing fix register user testing fix register user testing fix Authentication for User Added slint changes removed mocha added new features added new features Solved comflicts changed file added changes added new Test added new Test resolved test cases resolved test cases implemented two-factor authentication for enhanced security implemented two-factor authentication for enhanced security check whether the usertype is vendor to proceed with 2FA test the 2fa authentication Design the database schema for storing seller products and related information create endpoints for category and also database schema fix routes for products & categories implement CRUD operations for category entity create swagger docs for category routes adds delete documentation for category routes complete documentation for category routes implementing craate new product route and its controller implementing get product route and its controller working on update function Extend API endpoints store reference ID of vendor ft-Product-Docs This PR add the product swagger docs and some test category bug-documentation-fixes Fixing the errors on the doumentation add new tests for buyers login Design the database schema for storing seller products and related information create endpoints for category and also database schema fix routes for products & categories implement CRUD operations for category entity create swagger docs for category routes adds delete documentation for category routes complete documentation for category routes implementing craate new product route and its controller implementing get product route and its controller working on update function Extend API endpoints store reference ID of vendor ft-Product-Docs This PR add the product swagger docs and some test category bug-documentation-fixes Fixing the errors on the doumentation store reference ID of vendor replacing try & catch with errorHandler middleware remove all try & catch blocks in product controller validating routes fix minor errors in test categories Category-testing add category testing cases init commit for prouct test product controller test complete product test merging all commits delete product data after testing add --detectOpenHandles flag
addf31c
to
9082fc4
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.
It looks Good for me!!!
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.
👍
What does this PR do?
This pull request adds the product management feature to our app. It defines the products and the category models, categories are used to group products which means there is a relationship between product and category model.
The PR also allows vendors to perform all CRUD Operations on Products and Categories such means a vendor can add, update, read, and delete products and categories
Description of Task to be completed?
Create
Read
Update
Delete
How to Test
Clone the Branch, install all dependencies and run this command: npm run dev
First Register as a vendor if you do not have an account(if you have account skip to number 3)
POST: http://localhost:3000/api/v1/register
Verify your account by providing your code from your email
POST: http://localhost:3000/api/v1/confirm
Login and get Token from email
POST: http://localhost:3000/api/v1/login
Verify 2FA
POST: http://localhost:3000/api/v1/verify2FA/:userId
Add a category
POST: http://localhost:3000/api/v1/category
Add a product
POST: http://localhost:3000/api/v1/product
Update a category
PUT: http://localhost:3000/api/v1/category/{categoryId}
Update a product
PUT: http://localhost:3000/api/v1/product/:productId
Delete a product
DELETE: http://localhost:3000/api/v1/product/{productId}
Delete a Category
DELETE: http://localhost:3000/api/v1/category/{categoryId}
Get all products and one product by Id
GET: http://localhost:3000/api/v1/product/
GET: http://localhost:3000/api/v1/product/{productId}
Get all categories and one category by Id
GET: http://localhost:3000/api/v1/category
GET: http://localhost:3000/api/v1/category/{categoryId}
Test Screenshots
Swagger Screenshot
Any background context you want to provide?
Right know there are some features that have been not added yet such as Currency and Seller Collection features, we worked on whats important for the team member who are depending on our PR to start working, but we are looking for a way to implement these feature after merging.