-
Notifications
You must be signed in to change notification settings - Fork 8
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
#166241013 Implement articles reading statistics #62
Conversation
35a35a1
to
210771e
Compare
src/sequelize/models/share.js
Outdated
// associations can be defined here | ||
}; | ||
return Share; | ||
}; |
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.
Newline required at end of file but not found eol-last
src/sequelize/models/share.js
Outdated
slug: DataTypes.STRING, | ||
provider: DataTypes.STRING | ||
}, {}); | ||
Share.associate = function(models) { |
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.
'models' is defined but never used no-unused-vars
Missing space before function parentheses space-before-function-paren
Unexpected unnamed function func-names
src/sequelize/models/share.js
Outdated
@@ -0,0 +1,12 @@ | |||
'use strict'; |
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.
'use strict' is unnecessary inside of modules strict
Expected newline after "use strict" directive lines-around-directive
bc9e8fb
to
0a40da1
Compare
0a40da1
to
80f9142
Compare
cf8c750
to
4b7240d
Compare
4b7240d
to
e214a19
Compare
What does this PR do?
This PR enables users to see articles readings statistics
Description of Task to be completed?
Have the following endpoints working :
GET /api/articles/:slug/comments/count
GET /api/articles/:slug/views
GET /api/articles/:slug/shares/facebook
GET /api/articles/:slug/shares/twitter
GET /api/articles/:slug/shares/email
GET /api/articles/:slug/shares
How should this be manually tested?
Clone the repo, cd into it and RUN yarn install to install all the dependencies,
• Run the migration
sequelize db:migrate
,• Run the seeds
sequelize db:seed:all
,• Run
yarn test
for tests,• then Run
yarn dev
to start the server.Use postman to test if the endpoints are working.
What are the relevant pivotal tracker stories?
#166241013
Use Case document
https://docs.google.com/document/d/1GsSGnNb99l11xMxwf9AoIBx1RMyn2raz9Uxpsh6KrYs/edit?usp=sharing