ios - console.log not showing in Parse Logs page -
In the cloud code below I want to get feedback of all the functions, but after calling the code to my customer Pars Logs page: I can only see:
Here's my cloud code: I will need to add some push and other nested query after save (all) before / before trying / Is the right way to do or if I have to create the code in a different way. I'm new to javascript And honestly, I am struggling to understand some concepts, such as any help of promises will be greatly appreciated. Immediately after calling asynchronous call, which ends running the cloud code. If you replace just I have not seen your remaining question about the promises. You should check that what you want here Essentially, Here you will want to do:. For each asynchronous action you want to do it, at the end of the I2014-10-08T15: 28: 32.930Z] v249: User DGU 143 Eusjo for Exho DEGU 143 Apso accept Rail Cloud Work with: Input: {"Meeting ID": "Bust GNHOir"} Result: Meeting Approved
pars.cloud.define ("sweatmitting", function (request, response) {var UserAcceptingTheMeeting = request.user; var meetingId = request.params.meetingId; var changed objects = []; var Query formatting = new parse.queryvueu ("meeting object"); queryForMeeting.equalTo ("objectId", meeting ID); queryForMeeting.first ({success: work} {var userCreatorOfMeeting = meeting.get ("user"); user accept Karnametting. In Creation ("Approved Meetings", 1); Replaced Objects. Push (User Accepts Ymeteting); Meeting.ed ("Participants Object ID", User Approved Themitting.ID); Length (= "participant" object). Length === MeetingGate ("Meetinging Member of Parsons")) {meeting.set ("available", false);} changed objects. Push (meeting) ; Parse.Object.saveAll (Converted Objects, {Success: Function} {console.log ("Successfully Saved Objects"); // This Line does not show response. Successful ("Objects saved");}, Error : Function (error) {// An error occurred while saving an object. Future inquiries and push notifications will reply here. Successful ("meeting acceptance");}, error: work () {response.error ("failed to accept meeting");} }};});
response.success ("Objects saved"), then
response .success (
Parse.Cloud.define ("acceptMeetingBis", function (request, response) {var userAcceptingTheMeeting = request.user; on meetingId = request.params.meetingId ; On changedObjects = []; meetingToAccept; on queryForMeeting = new Parse.Query ( "MeetingObject"); queryForMeeting.get (meetingId) then (function (meeting) {meetingToAccept = meeting; userCreatorOfMeeting = meeting.get ("user"); userAcceptingTheMeeting.increment ("acceptedMeetings", +1); returned userAcceptingTheMeeting. Save ();}.) (Function (UserHow approvedMettingNawsed) {meetingToAccept.add ("participantsObjectId", Userhoe ApprovedAmagingAvailability.ad); if (MeetingOnEXEXptAgate ("ParticipantsIBJictID") Length === meetingToActactGet ("meetingforeforeforpers")} {meetingToAccept.set ("available" false);} Accept the return meeting again ();}). Then (function (saved meeting) {response.success ("acceptance meeting");}, function n (error) {response.error ("failed to accept meeting");}); });
.then function and return the result (this prompts). Keep adding the
.then function, until you want to do the work, call at the point on which call
response.success
Comments
Post a Comment