Skip to content
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

feat(core-api): enable registering routes with pagination #3895

Merged
merged 1 commit into from
Jul 15, 2020

Conversation

sebastijankuzner
Copy link
Contributor

Summary

This PR relates to #3894.

Instead of exposing paginated routes list, every route can define optional paginate property inside options.plugins on route registration.

Example:

server.route({
        method: "GET",
        path: "...",
        handler: ...,
        options: {
             plugins: {
                pagination: {
                    enabled: true,
                },
            },
        }
})

Checklist

  • Tests
  • Ready to be merged

@codecov
Copy link

codecov bot commented Jul 14, 2020

Codecov Report

Merging #3895 into develop will decrease coverage by 83.92%.
The diff coverage is 83.33%.

Impacted file tree graph

@@             Coverage Diff              @@
##           develop    #3895       +/-   ##
============================================
- Coverage    97.61%   13.69%   -83.93%     
============================================
  Files          618      618               
  Lines        14439    14436        -3     
  Branches      1726     1725        -1     
============================================
- Hits         14095     1977    -12118     
- Misses         155    12344    +12189     
+ Partials       189      115       -74     
Flag Coverage Δ
#functional 6.76% <0.00%> (+<0.01%) ⬆️
#integration 9.87% <83.33%> (-0.01%) ⬇️
#unit ?
Impacted Files Coverage Δ
packages/core-api/src/routes/blocks.ts 100.00% <ø> (ø)
packages/core-api/src/routes/delegates.ts 100.00% <ø> (ø)
packages/core-api/src/routes/locks.ts 100.00% <ø> (ø)
packages/core-api/src/routes/peers.ts 100.00% <ø> (ø)
packages/core-api/src/routes/transactions.ts 100.00% <ø> (ø)
packages/core-api/src/routes/votes.ts 100.00% <ø> (ø)
packages/core-api/src/routes/wallets.ts 100.00% <ø> (ø)
packages/core-api/src/plugins/pagination/ext.ts 77.55% <83.33%> (-22.45%) ⬇️
packages/core/src/cli.ts 0.00% <0.00%> (-100.00%) ⬇️
packages/core-p2p/src/errors.ts 0.00% <0.00%> (-100.00%) ⬇️
... and 558 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5222b5c...eaeaf15. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants