-
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
#161290903 CRUD operations for articles #13
#161290903 CRUD operations for articles #13
Conversation
queryInterface.bulkInsert('Article', mockArticle, {}); | ||
}, | ||
|
||
down: (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.
'Sequelize' is defined but never used no-unused-vars
import mockArticle from '../../helpers/seedData/articles.json'; | ||
|
||
export default { | ||
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.
'Sequelize' is defined but never used no-unused-vars
|
||
}, | ||
|
||
down: (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.
'Sequelize' is defined but never used no-unused-vars
export default { | ||
up: (queryInterface, Sequelize) => { queryInterface.bulkInsert('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.
Block must not be padded by blank lines padded-blocks
|
||
export default { | ||
up: (queryInterface, Sequelize) => { queryInterface.bulkInsert('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.
Trailing spaces not allowed no-trailing-spaces
import mockUser from '../../helpers/seedData/users.json'; | ||
|
||
export default { | ||
up: (queryInterface, Sequelize) => { queryInterface.bulkInsert('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.
'Sequelize' is defined but never used no-unused-vars
Statement inside of curly braces should be on next line brace-style
@@ -0,0 +1,17 @@ | |||
import mockUser from '../../helpers/seedData/users.json'; |
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.
'mockUser' is defined but never used no-unused-vars
[Op.like]: `%${articleId}` | ||
} | ||
} | ||
}) |
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 a newline before ')' function-paren-newline
message: 'Unauthorized' | ||
}); | ||
} | ||
Article.update({ |
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 a newline after '(' function-paren-newline
0fa7e2f
to
709f33a
Compare
[Op.like]: `%${articleId}` | ||
} | ||
} | ||
}).then(() => { |
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 a newline before ')' function-paren-newline
abac953
to
3b0ded7
Compare
3b0ded7
to
b3f7918
Compare
@uwaelpis Please resolve the conflicts here. |
e18986b
to
7a6bce5
Compare
- Write test for endpoints - Implemented relationship in model and migration - Validationhelpers for articles inputs - Create article functionalities - Update article functionalities - Read article functionalities - Delete article functionality [Finishes #161290903]
7a6bce5
to
4ea7723
Compare
What does this PR do?
Description of Task to be completed?
api/v1/articles
unprotected - it fetches all published articlesapi/v1/articles/drafts
protected - it fetches all drafts by the authenticated userapi/v1/users/articles
protected - it fetches all published article by the authenticated userapi/v1/articles/:slug
unprotected - it fetches an article with slug parameterapi/v1/articles
protected - it creates an articleapi/v1/articles/:slug/publish
protected - it allows only author to publish article.api/v1/articles/:slug
protected - it allows authors to edit their articles whether published or draftapi/v1/articles/:slug
protected - it allows authors to delete their own articles.How should this be manually tested?
npm run dev
on command/shelllocalhost:3000
Any background context you want to provide?
users/register
What are the relevant pivotal tracker stories?
#161290903
Screenshots (if appropriate)
Questions: