update init lp_category,
This commit is contained in:
8
002_source/cms/src/db/QuizListenings/GetAll.tsx
Normal file
8
002_source/cms/src/db/QuizListenings/GetAll.tsx
Normal file
@@ -0,0 +1,8 @@
|
||||
import { COL_QUIZ_LISTENINGS } from '@/constants';
|
||||
import type { RecordModel } from 'pocketbase';
|
||||
|
||||
import { pb } from '@/lib/pb';
|
||||
|
||||
export default function getAllQuizListenings(): Promise<RecordModel[]> {
|
||||
return pb.collection(COL_QUIZ_LISTENINGS).getFullList();
|
||||
}
|
9
002_source/cms/src/db/QuizListenings/GetAllCount.tsx
Normal file
9
002_source/cms/src/db/QuizListenings/GetAllCount.tsx
Normal file
@@ -0,0 +1,9 @@
|
||||
// REQ0006
|
||||
import { COL_QUIZ_LISTENINGS } from '@/constants';
|
||||
|
||||
import { pb } from '@/lib/pb';
|
||||
|
||||
export default async function GetAllCount(): Promise<number> {
|
||||
const { totalItems: count } = await pb.collection(COL_QUIZ_LISTENINGS).getList(1, 9999, {});
|
||||
return count;
|
||||
}
|
Reference in New Issue
Block a user