// REQ0006
import { COL_USERS } from '@/constants';

import { pb } from '@/lib/pb';

export default async function GetAllCount(): Promise<number> {
  try {
    const result = await pb.collection(`users`).getList(1, 9999, { filter: 'email != ""' });
    const { totalItems: count } = result;
    return count;
  } catch (error) {
    console.error(error);
    return -99;
  }
}
