You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
THe below code hangs on the const user = await query1.get / find etc segment. if i put console.log after it won't log because the async function is not resolved... worked fine on parse 2.8.3
Parse.Cloud.define('exportData', async (req, res) => {
console.log("req params:", req.params, req.params.parseUserId);
if (!_.has(req.params, 'parseUserId')) {
return;
}
try {
console.log("At exportData");
//Export data from User and JournalEntry Collection
var id = req.params.parseUserId;
var query1 = new Parse.Query(Parse.User);
var query2 = new Parse.Query("JournalEntry");
var query3 = new Parse.Query("Timeline");
query2.equalTo("user", { "__type": "Pointer", "className": "_User", "objectId": id });
query3.equalTo("user", { "__type": "Pointer", "className": "_User", "objectId": id });
console.log("queries, ", query1, query2, query3, id, user); // does not work after consts
const user = await query1.get(id, { useMasterKey: true });
const journal = await query2.find({ useMasterKey: true });
const timeline = await query3.find({ useMasterKey: true });
console.log("Exporting user", id, user, journal, timeline);
//res.success("Exported User Data Successfully for " +user.get('email'));
console.log("Exporting PRO Status:", user.get("isPro"));
if ( user.get("isPro") == true ) {
await makeProPdf(user, journal, timeline);
}
else {
await makeFreePdf(user, journal, timeline);
}
} catch (err) {
//$res.error("Error:", err);
return err;
}
//return user.get('email');
});
The text was updated successfully, but these errors were encountered:
THe below code hangs on the const user = await query1.get / find etc segment. if i put console.log after it won't log because the async function is not resolved... worked fine on parse 2.8.3
Parse.Cloud.define('exportData', async (req, res) => {
console.log("req params:", req.params, req.params.parseUserId);
if (!_.has(req.params, 'parseUserId')) {
return;
}
try {
console.log("At exportData");
//Export data from User and JournalEntry Collection
var id = req.params.parseUserId;
var query1 = new Parse.Query(Parse.User);
var query2 = new Parse.Query("JournalEntry");
var query3 = new Parse.Query("Timeline");
query2.equalTo("user", { "__type": "Pointer", "className": "_User", "objectId": id });
query3.equalTo("user", { "__type": "Pointer", "className": "_User", "objectId": id });
console.log("queries, ", query1, query2, query3, id, user); // does not work after consts
const user = await query1.get(id, { useMasterKey: true });
const journal = await query2.find({ useMasterKey: true });
const timeline = await query3.find({ useMasterKey: true });
console.log("Exporting user", id, user, journal, timeline);
//res.success("Exported User Data Successfully for " +user.get('email'));
console.log("Exporting PRO Status:", user.get("isPro"));
if ( user.get("isPro") == true ) {
await makeProPdf(user, journal, timeline);
}
else {
await makeFreePdf(user, journal, timeline);
}
} catch (err) {
//$res.error("Error:", err);
return err;
}
//return user.get('email');
});
The text was updated successfully, but these errors were encountered: