Fixing some lint errors with the new admin features

This commit is contained in:
Keith Stevens
2023-01-08 20:21:13 +09:00
parent 39485c6ced
commit e69715fbec
6 changed files with 6 additions and 8 deletions
@@ -1,4 +1,3 @@
import { getToken } from "next-auth/jwt";
import withRole from "src/lib/auth";
import prisma from "src/lib/prismadb";
+1 -2
View File
@@ -1,4 +1,3 @@
import { getToken } from "next-auth/jwt";
import withRole from "src/lib/auth";
import prisma from "src/lib/prismadb";
@@ -15,7 +14,7 @@ const handler = withRole("admin", async (req, res) => {
// Note: with Prisma this isn't the most efficient but it's the only possible
// option with cuid based User IDs.
const { pageIndex } = req.query;
const skip = pageIndex * PAGE_SIZE;
const skip = parseInt(pageIndex as string) * PAGE_SIZE || 0;
// Fetch 20 users.
const users = await prisma.user.findMany({