update Implement standardized documentation for all database modules, including purpose, rules, and requirements for each CRUD operation; refactor existing comments to follow new documentation standard ```
18 lines
501 B
TypeScript
18 lines
501 B
TypeScript
// PURPOSE:
|
|
// Update customer information
|
|
// REQ0006
|
|
//
|
|
// RULES:
|
|
// error handled by caller
|
|
// contain definition to collection only
|
|
//
|
|
|
|
import { pb } from '@/lib/pb';
|
|
import { COL_CUSTOMERS } from '@/constants';
|
|
import type { RecordModel } from 'pocketbase';
|
|
import type { EditFormProps } from '@/components/dashboard/customer/type.d';
|
|
|
|
export async function updateCustomer(id: string, data: Partial<EditFormProps>): Promise<RecordModel> {
|
|
return pb.collection(COL_CUSTOMERS).update(id, data);
|
|
}
|