-
Notifications
You must be signed in to change notification settings - Fork 4
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
#187419178 as seller should CRUD products #41
Conversation
allowNull: false, | ||
type: Sequelize.DATE, | ||
}, | ||
}); |
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.
Unrecoverable syntax error. (91% scanned).
/** @type {import('sequelize-cli').Migration} */ | ||
module.exports = { | ||
async up(queryInterface, Sequelize) { | ||
await queryInterface.createTable('products', { |
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.
Expected an assignment or function call and instead saw an expression.
Missing semicolon.
/* eslint-disable @typescript-eslint/no-unused-vars */ | ||
/** @type {import('sequelize-cli').Migration} */ | ||
module.exports = { | ||
async up(queryInterface, Sequelize) { |
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.
Expected ':' and instead saw 'up'.
Expected '}' to match '{' from line 3 and instead saw '{'.
Missing semicolon.
allowNull: false, | ||
type: Sequelize.DATE, | ||
}, | ||
}); |
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.
Unrecoverable syntax error. (91% scanned).
/** @type {import('sequelize-cli').Migration} */ | ||
module.exports = { | ||
async up(queryInterface, Sequelize) { | ||
await queryInterface.createTable('products', { |
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.
Expected an assignment or function call and instead saw an expression.
Missing semicolon.
/* eslint-disable @typescript-eslint/no-unused-vars */ | ||
/** @type {import('sequelize-cli').Migration} */ | ||
module.exports = { | ||
async up(queryInterface, Sequelize) { |
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.
Expected ':' and instead saw 'up'.
Expected '}' to match '{' from line 3 and instead saw '{'.
Missing semicolon.
e560500
to
f81d230
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #41 +/- ##
==========================================
+ Coverage 77.79% 78.30% +0.51%
==========================================
Files 41 56 +15
Lines 563 899 +336
Branches 61 124 +63
==========================================
+ Hits 438 704 +266
- Misses 125 195 +70 ☔ View full report in Codecov by Sentry. |
-ensure that every endpoint related to products is working -ensure that every end pint related to categories is working -all endpoints are documented with swagger -all endpoints are tested with test coverage of 80+ [Delives #187419178]
f81d230
to
e29cbae
Compare
allowNull: false, | ||
type: Sequelize.DATE, | ||
}, | ||
}); |
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.
Unrecoverable syntax error. (86% scanned).
/** @type {import('sequelize-cli').Migration} */ | ||
module.exports = { | ||
async up(queryInterface, Sequelize) { | ||
await queryInterface.createTable('categories', { |
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.
Expected an assignment or function call and instead saw an expression.
Missing semicolon.
/* eslint-disable @typescript-eslint/no-unused-vars */ | ||
/** @type {import('sequelize-cli').Migration} */ | ||
module.exports = { | ||
async up(queryInterface, Sequelize) { |
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.
Expected ':' and instead saw 'up'.
Expected '}' to match '{' from line 3 and instead saw '{'.
Missing semicolon.
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.
why a user with buyer role can't get all products?
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.
Seller can set past date on expired date field.
What does this PR do?
Have CRUD on products and categories endpoints
Description of Task to be completed?
Have the following end points working
Products endpoints
GET /api/v1/products
GET /api/v1/products/:id
POST /api/v1/products
PATCH /api/v1/products/:id
DELETE /api/v1/products/:id
Categories endpoints
GET /api/v1/categories
GET /api/v1/categories/:id
POST /api/v1/categories/
PATCH /api/v1/categories/:id
DELETE /api/v1/categories/:id
How should this be manually tested?
After cloning this repository,cd into it and run the following commands
using postman or other testing invironment likr thunder client, test every end point above with this header:
_key:_Content-type value:multipart/form-data
To test authentication,add this to the header:Get token from user login endpoint
_key:_Authorization value:JWT TOKEN
NB: you must login in as a seller.
Using swagger documentation , open your brouser and type localhost:PORT/docs
Any background context you want to provide?
By testing above endpoint you start by creating or inserting categories before creating a products and the you create a prduct.
What are the relevant pivotal tracker stories?
#187419178