update for lp_categories,
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
// 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 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;
|
||||
}
|
||||
export default function getAllUserMetasCount(): Promise<number> {
|
||||
return pb
|
||||
.collection(COL_USER_METAS)
|
||||
.getList(1, 9998)
|
||||
.then((res) => res.totalItems);
|
||||
}
|
||||
|
Reference in New Issue
Block a user