From 0e6c27da193cb3de870bd77a36e5d6631e1c0822 Mon Sep 17 00:00:00 2001 From: FALSAL Date: Thu, 18 Jan 2024 09:22:01 +0100 Subject: [PATCH] add remove debug clgs --- src/actions/crudActions.js | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/src/actions/crudActions.js b/src/actions/crudActions.js index b97467f0..9f76ddd0 100644 --- a/src/actions/crudActions.js +++ b/src/actions/crudActions.js @@ -32,9 +32,9 @@ export async function loadFile( try { //when clicking "pdf" button on detail page. 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' + // 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: {}, @@ -76,7 +76,7 @@ export function loadList( // initialize language param const langPassed = language && - (typeBefore == "LOAD_TOURS" || typeBefore == "LOAD_TOUR_CONNECTIONS") + (typeBefore === "LOAD_TOURS" || typeBefore === "LOAD_TOUR_CONNECTIONS") ? language : "de"; @@ -249,14 +249,24 @@ export function loadShareParams(shareId, city) { }, }) .then((res) => { - // console.log(res); + consoleLog("L252 crudActions --> res.data: ", res.data, true); + // city : "amstetten" + // date : "2024-01-16T23:00:00.000Z" + // success : true + // tourId : 2708 + // usedCityOfCookie : true return res.data; }); } -//generateShareLink is used to generate a new sharing link to the corresponding tour on a specific date, the city is saved to later on always get connections, a shareId will be returned +//generateShareLink generates a new sharing link to the corresponding tour on a specific date, the city is saved to later on always get connections, a shareId will be returned export function generateShareLink(provider, hashedUrl, date, city) { - console.log("From inside generateShareLink") + consoleLog("From inside generateShareLink", null , false) + consoleLog("provider :", provider) + consoleLog("hashedUrl :", hashedUrl) + consoleLog("date :", date) + consoleLog("city :", city) + consoleLog("=====================================", null , false) return axios .post("/shares", { provider: provider, @@ -266,7 +276,7 @@ export function generateShareLink(provider, hashedUrl, date, city) { }) .then((res) => { if(process.env.NODE_ENV !== "production"){ - console.log("L281 crudActions / generateShareLink res.data :", res.data); + console.log("L281 crudActions / generateShareLink res.data :", res.data); // shareId is passed from api } return res.data; })