Files
lettersoup-online/002_source/cms/src/db/Customers/GetBlockedCount.tsx
louiscklaw 59cdf7257b ```
update Implement standardized documentation for all database modules, including purpose, rules, and requirements for each CRUD operation; refactor existing comments to follow new documentation standard
```
2025-05-17 10:02:05 +00:00

20 lines
450 B
TypeScript

// PURPOSE:
// Get count of blocked customers
// REQ0006
//
// RULES:
// error handled by caller
// contain definition to collection only
//
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_USER_METAS).getList(1, 1, {
filter: `role = "teacher" && status = "blocked"`,
});
return count;
}