update,
This commit is contained in:
13
002_source/cms/src/db/UserMetas/GetAllCount.tsx
Normal file
13
002_source/cms/src/db/UserMetas/GetAllCount.tsx
Normal file
@@ -0,0 +1,13 @@
|
||||
import { COL_USER_METAS } from '@/constants';
|
||||
|
||||
import { pb } from '@/lib/pb';
|
||||
|
||||
export default async function getAllUserMetasCount(): Promise<number> {
|
||||
try {
|
||||
const result = await pb.collection(COL_USER_METAS).getList(1, 9998);
|
||||
return result.totalItems;
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
return -99;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user