This repository has been archived by the owner on May 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
KvNGCzA
requested review from
tersoo-atsen,
sulenchy,
andela-moe,
mbilesanmi and
augustineezinwa
November 11, 2018 08:16
darthrighteous
temporarily deployed
to
valinor-ah-backend-stagi-pr-41
November 11, 2018 08:17
Inactive
KvNGCzA
force-pushed
the
feature/161291016/enable-pagination
branch
from
November 11, 2018 08:38
20b8ff2
to
3f4dfd7
Compare
KvNGCzA
changed the title
feature(ArticleController): enable pagination support
#161291016 Enable pagination support
Nov 11, 2018
KvNGCzA
force-pushed
the
feature/161291016/enable-pagination
branch
from
November 11, 2018 08:57
3f4dfd7
to
8d21655
Compare
KvNGCzA
force-pushed
the
feature/161291016/enable-pagination
branch
from
November 11, 2018 09:22
8d21655
to
db2d0b6
Compare
sulenchy
suggested changes
Nov 11, 2018
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 observe you are using req.params
. I would have preferred req.query
because pagination is more like filtration. I think a URL such as /article?page=2 looks much better than /article/page/2. Can you weigh the balance?
mbilesanmi
reviewed
Nov 12, 2018
mbilesanmi
suggested changes
Nov 12, 2018
mbilesanmi
suggested changes
Nov 12, 2018
KvNGCzA
force-pushed
the
feature/161291016/enable-pagination
branch
from
November 12, 2018 09:27
a76be92
to
2bfa76b
Compare
KvNGCzA
force-pushed
the
feature/161291016/enable-pagination
branch
from
November 12, 2018 11:44
2bfa76b
to
30ddcd2
Compare
KvNGCzA
force-pushed
the
feature/161291016/enable-pagination
branch
from
November 12, 2018 11:45
30ddcd2
to
b817789
Compare
KvNGCzA
force-pushed
the
feature/161291016/enable-pagination
branch
from
November 12, 2018 11:50
b817789
to
bb85ad1
Compare
KvNGCzA
force-pushed
the
feature/161291016/enable-pagination
branch
from
November 12, 2018 13:15
bb85ad1
to
b4da9ad
Compare
houndci-bot
reviewed
Nov 12, 2018
augustineezinwa
approved these changes
Nov 12, 2018
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.
@mbilesanmi LGTM
KvNGCzA
force-pushed
the
feature/161291016/enable-pagination
branch
from
November 12, 2018 13:43
b4da9ad
to
152891d
Compare
Pull Request Test Coverage Report for Build 478
💛 - Coveralls |
KvNGCzA
force-pushed
the
feature/161291016/enable-pagination
branch
from
November 12, 2018 14:38
152891d
to
629a9a7
Compare
KvNGCzA
force-pushed
the
feature/161291016/enable-pagination
branch
from
November 12, 2018 15:18
629a9a7
to
b8a7cd3
Compare
sulenchy
approved these changes
Nov 12, 2018
KvNGCzA
force-pushed
the
feature/161291016/enable-pagination
branch
from
November 12, 2018 16:11
b8a7cd3
to
f30df11
Compare
mbilesanmi
reviewed
Nov 13, 2018
mbilesanmi
approved these changes
Nov 13, 2018
KvNGCzA
force-pushed
the
feature/161291016/enable-pagination
branch
from
November 13, 2018 10:51
f30df11
to
5cc041a
Compare
- add pagination support for fetch articles route - add validator for pageNumber - add middleware to fetch all articles route - add tests for fetch articles route [Finishes #161291016]
KvNGCzA
force-pushed
the
feature/161291016/enable-pagination
branch
from
November 13, 2018 12:38
5cc041a
to
fbe802b
Compare
houndci-bot
reviewed
Nov 13, 2018
- ensure page query is used [Finishes #61291016]
KvNGCzA
force-pushed
the
feature/161291016/enable-pagination
branch
from
November 13, 2018 12:44
fbe802b
to
3d8c084
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
have get
api/v1/articles?page=number&limit=number
route working with pagination support.Description of Task to be completed?
How should this be manually tested?
npm start
to start your servernpm run db-init
to pouplate your databaselocalhost:{PORT}/api/v1/articles
routeAny background context you want to provide?
N/A
What are the relevant pivotal tracker stories?
#161291016
Screenshots (if appropriate)
Fetching all articles
Error if page query and limit query are not integers
Error if page query or limit query are less than 1
Error if available page number is exceeded
Error if queries are not provided
Questions:
N/A