12 lines
398 B
TypeScript
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);
|
|
}
|