prisma-pagination
Advanced tools
Comparing version 0.1.1 to 0.1.2
{ | ||
"name": "prisma-pagination", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "source": "src/index.ts", |
@@ -26,3 +26,2 @@ # Prisma Pagination | ||
// to have args and result typed | ||
const result = await paginate<User, Prisma.UserFindManyArgs>( | ||
@@ -63,7 +62,11 @@ prisma.user, | ||
export const pagination = (req, res, next) => { | ||
const pagination = (req, res, next) => { | ||
const page = Number(req.query.page) || 1 | ||
req.paginate = createPaginator({ page }) | ||
next() | ||
} | ||
app.use(pagination) | ||
``` | ||
@@ -70,0 +73,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9252
99