We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In the current implementation, the totalCount is set directly on the request object:
request.totalCount = 10; reply(results);
Hapi recommends that you use the 'plugins' property to store plugin-specific state. From the docs:
Provides a place to store and pass request-level plugin data. The plugins is an object where each key is a plugin name and the value is the state.
So it would be better to do:
request.plugins['hapi-pagination'] = { totalCount: 10 }; reply(results);
Although this would be a breaking change, it is a safe place to store plugin data without potential conflicts with the framework.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In the current implementation, the totalCount is set directly on the request object:
Hapi recommends that you use the 'plugins' property to store plugin-specific state. From the docs:
So it would be better to do:
Although this would be a breaking change, it is a safe place to store plugin data without potential conflicts with the framework.
The text was updated successfully, but these errors were encountered: