Skip to content

Commit

Permalink
chore: remove stdout logs
Browse files Browse the repository at this point in the history
  • Loading branch information
gary-van-woerkens committed Nov 4, 2024
1 parent 44826fc commit 8162260
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion formulaire/pages/api/comments/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion formulaire/pages/api/docs/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion formulaire/pages/api/dossier/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion formulaire/pages/api/enfants/dossier/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
2 changes: 1 addition & 1 deletion formulaire/pages/api/remunerations/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
});
Expand Down
2 changes: 1 addition & 1 deletion formulaire/pages/api/remunerations/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
});
Expand Down
2 changes: 1 addition & 1 deletion formulaire/pages/api/sirene/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion formulaire/pages/api/societe/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions formulaire/pages/api/sync/inc/remunerations/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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` });
Expand All @@ -33,7 +33,7 @@ const get: NextApiHandler = async (req, res) => {
},
},
});
console.log("REMUNERATIONS: ", remunerations);
// console.log("REMUNERATIONS: ", remunerations);
res.status(200).json(remunerations);
}
};
Expand Down
2 changes: 1 addition & 1 deletion formulaire/pages/api/sync/out/dossiers/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
Expand Down
4 changes: 2 additions & 2 deletions formulaire/pages/api/sync/out/dossiers/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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" ||
Expand All @@ -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();
Expand Down

0 comments on commit 8162260

Please # to comment.