Added Money System
This commit is contained in:
@@ -46,7 +46,7 @@ export async function PUT(
|
||||
}
|
||||
|
||||
const body = await request.json();
|
||||
const { nom, prenom, dateNaissance, adresse, email, telephone, situation, prescripteur, facturation, commentaire, telephoneSecondaire, instructions } = body;
|
||||
const { nom, prenom, dateNaissance, adresse, email, telephone, situation, prescripteur, facturation, forfait, commentaire, telephoneSecondaire, instructions } = body;
|
||||
|
||||
const updateData: any = {};
|
||||
if (nom) updateData.nom = nom;
|
||||
@@ -58,6 +58,7 @@ export async function PUT(
|
||||
if (situation !== undefined) updateData.situation = situation || null;
|
||||
if (prescripteur !== undefined) updateData.prescripteur = prescripteur || null;
|
||||
if (facturation !== undefined) updateData.facturation = facturation || null;
|
||||
if (forfait !== undefined) updateData.forfait = forfait || null;
|
||||
if (commentaire !== undefined) updateData.commentaire = commentaire || null;
|
||||
if (telephoneSecondaire !== undefined) updateData.telephoneSecondaire = telephoneSecondaire || null;
|
||||
if (instructions !== undefined) updateData.instructions = instructions || null;
|
||||
|
||||
@@ -54,7 +54,7 @@ export async function POST(request: NextRequest) {
|
||||
}
|
||||
|
||||
const body = await request.json();
|
||||
const { nom, prenom, dateNaissance, adresse, email, telephone, situation, prescripteur, facturation, commentaire, telephoneSecondaire, instructions } = body;
|
||||
const { nom, prenom, dateNaissance, adresse, email, telephone, situation, prescripteur, facturation, forfait, commentaire, telephoneSecondaire, instructions } = body;
|
||||
|
||||
if (!nom || !prenom || !dateNaissance || !adresse || !email || !telephone) {
|
||||
return NextResponse.json(
|
||||
@@ -74,6 +74,7 @@ export async function POST(request: NextRequest) {
|
||||
situation: situation || null,
|
||||
prescripteur: prescripteur || null,
|
||||
facturation: facturation || null,
|
||||
forfait: forfait || null,
|
||||
commentaire: commentaire || null,
|
||||
telephoneSecondaire: telephoneSecondaire || null,
|
||||
instructions: instructions || null,
|
||||
|
||||
Reference in New Issue
Block a user