From 816226081fff0606a28685f99df7641202ee9fd1 Mon Sep 17 00:00:00 2001 From: Gary van Woerkens Date: Mon, 4 Nov 2024 15:23:08 +0100 Subject: [PATCH] chore: remove stdout logs --- formulaire/pages/api/comments/index.tsx | 2 +- formulaire/pages/api/docs/[id].tsx | 2 +- formulaire/pages/api/dossier/[id].tsx | 2 +- formulaire/pages/api/enfants/dossier/[id].tsx | 2 +- formulaire/pages/api/remunerations/[id].tsx | 2 +- formulaire/pages/api/remunerations/index.tsx | 2 +- formulaire/pages/api/sirene/index.tsx | 2 +- formulaire/pages/api/societe/index.tsx | 2 +- formulaire/pages/api/sync/inc/remunerations/index.tsx | 4 ++-- formulaire/pages/api/sync/out/dossiers/[id].tsx | 2 +- formulaire/pages/api/sync/out/dossiers/index.tsx | 4 ++-- 11 files changed, 13 insertions(+), 13 deletions(-) diff --git a/formulaire/pages/api/comments/index.tsx b/formulaire/pages/api/comments/index.tsx index 8de9aa1f6..afdf8b4d4 100644 --- a/formulaire/pages/api/comments/index.tsx +++ b/formulaire/pages/api/comments/index.tsx @@ -75,7 +75,7 @@ const post: NextApiHandler = async (req, res) => { let data = JSON.parse(req.body) as Comments; //@ts-ignore data.userId = session?.dbUser.id; - console.log("comment to create : ", data); + // console.log("comment to create : ", data); try { const comment = await prisma.comments.create({ data }); res.status(200).json(comment); diff --git a/formulaire/pages/api/docs/[id].tsx b/formulaire/pages/api/docs/[id].tsx index 45bca7316..a8685b315 100644 --- a/formulaire/pages/api/docs/[id].tsx +++ b/formulaire/pages/api/docs/[id].tsx @@ -75,7 +75,7 @@ export const uploadFile = ( return new Promise((resolve, reject) => { form.parse(req, (err, fields, files) => { if (err) reject(err); - console.log("files : ", files); + // console.log("files : ", files); try { const key = process.env.CIPHER_KEY as string; const iv = process.env.CIPHER_IV as string; diff --git a/formulaire/pages/api/dossier/[id].tsx b/formulaire/pages/api/dossier/[id].tsx index 2553879c4..272bcc79b 100644 --- a/formulaire/pages/api/dossier/[id].tsx +++ b/formulaire/pages/api/dossier/[id].tsx @@ -6,7 +6,7 @@ import client from "src/lib/prismaClient"; const handler: NextApiHandler = async (req, res) => { const session = await getServerSession(req, res, authOptions); - console.log("session id", session); + // console.log("session id", session); if (!session) { res.status(401).end(); return; diff --git a/formulaire/pages/api/enfants/dossier/[id].tsx b/formulaire/pages/api/enfants/dossier/[id].tsx index 86364918b..4cb9cd071 100644 --- a/formulaire/pages/api/enfants/dossier/[id].tsx +++ b/formulaire/pages/api/enfants/dossier/[id].tsx @@ -24,7 +24,7 @@ function getId(req: NextApiRequest): number { const get: NextApiHandler = async (req, res) => { const session = await getServerSession(req, res, authOptions); - console.log("order : ", req.query.order); + // console.log("order : ", req.query.order); try { const dossierId = getId(req); const dossierConcerned = await client.dossier.findUnique({ diff --git a/formulaire/pages/api/remunerations/[id].tsx b/formulaire/pages/api/remunerations/[id].tsx index bc572b630..e3e7f233d 100644 --- a/formulaire/pages/api/remunerations/[id].tsx +++ b/formulaire/pages/api/remunerations/[id].tsx @@ -21,7 +21,7 @@ const handler: NextApiHandler = async (req, res) => { const remove: NextApiHandler = async (req, res) => { const remunerationId = Number(req.body as string); try { - console.log("remunerationId: ", remunerationId); + // console.log("remunerationId: ", remunerationId); await client.remuneration.delete({ where: { id: remunerationId }, }); diff --git a/formulaire/pages/api/remunerations/index.tsx b/formulaire/pages/api/remunerations/index.tsx index ed33a4194..4b5cbf195 100644 --- a/formulaire/pages/api/remunerations/index.tsx +++ b/formulaire/pages/api/remunerations/index.tsx @@ -37,7 +37,7 @@ const post: NextApiHandler = async (req, res) => { const remove: NextApiHandler = async (req, res) => { const enfantId = Number(req.body as string); try { - console.log("ENFANT ID: ", enfantId); + // console.log("ENFANT ID: ", enfantId); await prisma.remuneration.deleteMany({ where: { enfantId: enfantId }, }); diff --git a/formulaire/pages/api/sirene/index.tsx b/formulaire/pages/api/sirene/index.tsx index 81fad8431..0d5cc8d9e 100644 --- a/formulaire/pages/api/sirene/index.tsx +++ b/formulaire/pages/api/sirene/index.tsx @@ -20,7 +20,7 @@ const handler: NextApiHandler = async (req, res) => { const get: NextApiHandler = async (req, res) => { const siret = req.query.siret || '' - console.log('token : ', process.env.TOKEN_SIRENE) + // console.log('token : ', process.env.TOKEN_SIRENE) let fetching = await fetch(`https://api.insee.fr/entreprises/sirene/V3.11/siret/${siret}`,{ method: 'GET', diff --git a/formulaire/pages/api/societe/index.tsx b/formulaire/pages/api/societe/index.tsx index 83667b798..c394c4e54 100644 --- a/formulaire/pages/api/societe/index.tsx +++ b/formulaire/pages/api/societe/index.tsx @@ -62,7 +62,7 @@ const post: NextApiHandler = async (req, res) => { const societe = await prisma.societeProduction.create({ data: { ...societeData.parse(data) }, }); - console.log("societe created : ", societe); + // console.log("societe created : ", societe); res.status(200).json(societe); } catch (e: unknown) { console.log(e); diff --git a/formulaire/pages/api/sync/inc/remunerations/index.tsx b/formulaire/pages/api/sync/inc/remunerations/index.tsx index e48349283..9c1b26f1f 100644 --- a/formulaire/pages/api/sync/inc/remunerations/index.tsx +++ b/formulaire/pages/api/sync/inc/remunerations/index.tsx @@ -21,7 +21,7 @@ const get: NextApiHandler = async (req, res) => { } } const externalIds = ids.map((id: string) => parseInt(id)) as number[]; - console.log("data externalIds received : ", data); + // console.log("data externalIds received : ", data); if (data.token !== process.env.API_KEY_SDP) { res.status(401).json({ error: `Unauthorized` }); @@ -33,7 +33,7 @@ const get: NextApiHandler = async (req, res) => { }, }, }); - console.log("REMUNERATIONS: ", remunerations); + // console.log("REMUNERATIONS: ", remunerations); res.status(200).json(remunerations); } }; diff --git a/formulaire/pages/api/sync/out/dossiers/[id].tsx b/formulaire/pages/api/sync/out/dossiers/[id].tsx index 3cba666df..3c32dfdf5 100644 --- a/formulaire/pages/api/sync/out/dossiers/[id].tsx +++ b/formulaire/pages/api/sync/out/dossiers/[id].tsx @@ -31,7 +31,7 @@ const get: NextApiHandler = async (req, res) => { method: "GET", }).then(async (r) => { if (!r.ok) { - console.log("r : ", r.status); + console.log("r : ", r.status); // TODO: to be replaced by an error ? } return r.json(); }); diff --git a/formulaire/pages/api/sync/out/dossiers/index.tsx b/formulaire/pages/api/sync/out/dossiers/index.tsx index 7cdcefe34..6f9253a0f 100644 --- a/formulaire/pages/api/sync/out/dossiers/index.tsx +++ b/formulaire/pages/api/sync/out/dossiers/index.tsx @@ -35,7 +35,7 @@ const post: NextApiHandler = async (req, res) => { societeProduction: SocieteProduction; enfants: EnfantData[]; }; - console.log("dossier to send : ", data); + // console.log("dossier to send : ", data); if ( data.dossier.statut === "BROUILLON" || @@ -47,7 +47,7 @@ const post: NextApiHandler = async (req, res) => { method: data.dossier.statut === "BROUILLON" ? "POST" : "PUT", }).then(async (r) => { if (!r.ok) { - console.log("r : ", r.status); + console.log("r : ", r.status); // TODO: to be replaced by an error ? res.status(500).json({ error: `Something went wrong : ${r.status}` }); } return r.json();