11 lines
285 B
TypeScript
11 lines
285 B
TypeScript
import { pb } from '@/lib/pb';
|
|
import { COL_USER_METAS } from '@/constants';
|
|
|
|
export async function getAllStudentsCount(): Promise<number> {
|
|
const result = await pb.collection(COL_USER_METAS).getList(1, 1, {
|
|
filter: `role = "student"`,
|
|
//
|
|
});
|
|
return result.totalItems;
|
|
}
|