update for lp_categories,

This commit is contained in:
louiscklaw
2025-04-21 05:16:30 +08:00
parent 3679924a6a
commit f65f6df660
60 changed files with 1919 additions and 1047 deletions

View File

@@ -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);
}