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

Skip value must be non-negative #205

Closed
mohammadrezahayati opened this issue Dec 31, 2023 · 2 comments
Closed

Skip value must be non-negative #205

mohammadrezahayati opened this issue Dec 31, 2023 · 2 comments

Comments

@mohammadrezahayati
Copy link

mohammadrezahayati commented Dec 31, 2023

I have developed a production app on the server but the app gives me this error.
When I use your package this error shows up Skip value must be non-negative, but received: -9223372036854775808
In the develop mode everything works fine but the production gave me this error.
Do you have any idea?

this is my code :
const searchQuery = search ? { $text: { $search: search } } : {}; const admins = await AdminModel.paginate(searchQuery, { sort: { createdAt: -1 }, page: page, limit: 10, });

@mohammadrezahayati
Copy link
Author

I solve the problem 😂

const admins = await AdminModel.paginate(searchQuery, { sort: { createdAt: -1 }, page: page ?? 1, limit: 10, });

@aravindnc
Copy link
Owner

Great.

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

No branches or pull requests

2 participants