update,
This commit is contained in:
11
002_source/cms/src/db/LessonCategories/GetAllCount.tsx
Normal file
11
002_source/cms/src/db/LessonCategories/GetAllCount.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
// REQ0006
|
||||
import { COL_LESSON_CATEGORIES } from '@/constants';
|
||||
|
||||
import { pb } from '@/lib/pb';
|
||||
|
||||
export default async function GetAllCount(): Promise<number> {
|
||||
const { totalItems: count } = await pb
|
||||
.collection(COL_LESSON_CATEGORIES)
|
||||
.getList(1, 9999, { filter: 'visible = "visible"' });
|
||||
return count;
|
||||
}
|
Reference in New Issue
Block a user