This commit is contained in:
louiscklaw
2025-05-08 14:38:34 +08:00
parent 61c10821b6
commit 7105bc85e3
57 changed files with 2973 additions and 5129 deletions

View File

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