fix: type error (temporary)

This commit is contained in:
Methapon2001 2024-04-09 13:08:08 +07:00
parent 3f0ed2c8d6
commit dd7e5aa2f2

View file

@ -26,7 +26,6 @@ if (!process.env.MINIO_BUCKET) {
const MINIO_BUCKET = process.env.MINIO_BUCKET; const MINIO_BUCKET = process.env.MINIO_BUCKET;
export type CustomerCreate = { export type CustomerCreate = {
code?: string;
status?: Status; status?: Status;
customerType: string; customerType: string;
customerName: string; customerName: string;
@ -34,7 +33,6 @@ export type CustomerCreate = {
}; };
export type CustomerUpdate = { export type CustomerUpdate = {
code?: string;
status?: "ACTIVE" | "INACTIVE"; status?: "ACTIVE" | "INACTIVE";
customerType?: string; customerType?: string;
customerName?: string; customerName?: string;
@ -101,6 +99,7 @@ export class CustomerController extends Controller {
const record = await prisma.customer.create({ const record = await prisma.customer.create({
data: { data: {
...body, ...body,
code: "CUSTOMER001",
createdBy: req.user.name, createdBy: req.user.name,
updateBy: req.user.name, updateBy: req.user.name,
}, },