mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-07-24 12:50:50 +08:00
Fixing some lint errors with the new admin features
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { getToken } from "next-auth/jwt";
|
||||
import withRole from "src/lib/auth";
|
||||
import prisma from "src/lib/prismadb";
|
||||
|
||||
|
||||
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user