Files
lettersoup-online/002_source/cms/src/db/Customers/Create.tsx
2025-04-23 02:02:47 +08:00

12 lines
398 B
TypeScript

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