Files
lettersoup-online/002_source/cms/src/db/Notifications/Create.tsx
2025-04-24 20:02:56 +08:00

12 lines
431 B
TypeScript

// api method for create notification record
// RULES:
// TBA
import { pb } from '@/lib/pb';
import { COL_NOTIFICATIONS } from '@/constants';
import type { NotificationFormProps } from '@/components/dashboard/notification/type.d';
import type { RecordModel } from 'pocketbase';
export async function createNotification(data: NotificationFormProps): Promise<RecordModel> {
return pb.collection(COL_NOTIFICATIONS).create(data);
}