Add customer management
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
"use server";
|
||||
|
||||
import {callApi} from "@/lib/api/callApi";
|
||||
import {Customer} from "@/app/customers/page";
|
||||
import {customerRoutes} from "@/app/api/customers/customerRoutes";
|
||||
|
||||
export async function validateCustomer(input: {
|
||||
email: string;
|
||||
companyName: string;
|
||||
street: string;
|
||||
zip: string;
|
||||
city: string;
|
||||
}): Promise<Customer[]> {
|
||||
return await callApi<Customer[]>(customerRoutes.validate, "POST", input);
|
||||
}
|
||||
Reference in New Issue
Block a user