This commit is contained in:
louiscklaw
2025-05-08 17:19:43 +08:00
parent 7105bc85e3
commit 5640d4d4f6
46 changed files with 520 additions and 268 deletions

View File

@@ -1,9 +1,9 @@
import { COL_STUDENTS } from '@/constants';
import { COL_USER_METAS } from '@/constants';
import { pb } from '@/lib/pb';
export default async function GetBlockedCount(): Promise<number> {
const { totalItems: count } = await pb.collection(COL_STUDENTS).getList(1, 1, {
filter: 'status = "blocked"',
const { totalItems: count } = await pb.collection(COL_USER_METAS).getList(1, 1, {
filter: 'status = "blocked" && role = "student"',
});
return count;
}