From 19b0669aceb31e168cfe47fae0ce491529e43c33 Mon Sep 17 00:00:00 2001 From: FALSAL Date: Mon, 15 Jan 2024 00:12:01 +0100 Subject: [PATCH] switch to consoleLog in crudActions --- src/actions/crudActions.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/actions/crudActions.js b/src/actions/crudActions.js index 8a97da94..b97467f0 100644 --- a/src/actions/crudActions.js +++ b/src/actions/crudActions.js @@ -31,10 +31,11 @@ export async function loadFile( } try { //when clicking "pdf" button on detail page. - console.log("L 33 crudActions / loadFile : route :", route);//example: "tours/1971/pdf" - console.log("L 34 crudActions / loadFile : data :", data, true);//example: {id: 1971, connection_id: 957752, connection_return_id: 957752, connection_return_ids: Array(1), connectionDate: '2024-01-11T00:00:00+01:00'} - console.log("L 36 crudActions / loadFile : responseType :", responseType); //'buffer' - + if(process.env.NODE_ENV !== "production"){ + consoleLog("L 33 crudActions / loadFile : route :", route);//example: "tours/1971/pdf" + consoleLog("L 34 crudActions / loadFile : data :", data, true);//example: {id: 1971, connection_id: 957752, connection_return_id: 957752, connection_return_ids: Array(1), connectionDate: '2024-01-11T00:00:00+01:00'} + consoleLog("L 36 crudActions / loadFile : responseType :", responseType); //'buffer' + } let res = await axios.get(route, { // data: {}, data: data,