mirror of
https://github.com/crocofied/CoreControl.git
synced 2025-12-22 18:06:36 +00:00
Update server count query to filter by hostServer set to 0 and null to fix pagination
This commit is contained in:
parent
ceb10a2ffe
commit
7d49baee6b
@ -42,7 +42,7 @@ export async function POST(request: NextRequest) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const totalHosts = await prisma.server.count({
|
const totalHosts = await prisma.server.count({
|
||||||
where: { hostServer: null }
|
where: { OR: [{ hostServer: 0 }, { hostServer: null }] }
|
||||||
});
|
});
|
||||||
|
|
||||||
const maxPage = Math.ceil(totalHosts / ITEMS_PER_PAGE);
|
const maxPage = Math.ceil(totalHosts / ITEMS_PER_PAGE);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user