Skip to content

Commit

Permalink
add remove debug clgs
Browse files Browse the repository at this point in the history
  • Loading branch information
Falsal committed Jan 18, 2024
1 parent 1e69a64 commit 0e6c27d
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions src/actions/crudActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {},
Expand Down Expand Up @@ -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";

Expand Down Expand Up @@ -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,
Expand All @@ -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;
})
Expand Down

0 comments on commit 0e6c27d

Please sign in to comment.