Questions tagged [parse-cloud-code]

This code runs in the Parse Cloud rather than running on a mobile device. For complex apps, sometimes developers just need a bit of logic that isn't running on a mobile device. Cloud Code makes this possible.

The Parse Platform's vision is to let developers build any mobile app without dealing with servers. For complex apps, sometimes developers just need a bit of logic that isn't running on a mobile device. Cloud Code makes this possible.

Cloud Code is easy to use because it's built on the same JavaScript SDK that powers thousands of apps. The only difference is that this code runs in on a Parse Server rather than running on a mobile device. When developers update their Cloud Code, it becomes available to all mobile environments instantly. They don't have to wait for a new release of their application. This lets developers change app behavior on the fly and add new features faster.

1120 questions
0
votes
2 answers

Query PFInstallation and add to channels key from cloud code

I am trying to get subscriptions added to all PFInstallations for a particular PFUser (for cases of one person using same login on iPhone iPad, etc.). I have a table view of all their Facebook friends who use the app as well. On selecting the…
user717452
  • 33
  • 14
  • 73
  • 149
0
votes
1 answer

Parse Cloud Code Update Counter Variable in Before_Save

I'm using Parse cloud code to update some counters on a user in beforeSave/afterDelete on certain classes. A user has a counter that keeps track of the number of their subscriptions. The subscription class is a relation class between a user and…
toddg
  • 2,863
  • 2
  • 18
  • 33
0
votes
1 answer

Duplicate Parse.com User objectId to another column

I am trying to write some Cloud Code for Parse that upon creation of a new _User, it will copy that user's objectId, append it, and then put the resulting value in a new column called SubscriptionObject. The code I have tried…
user717452
  • 33
  • 14
  • 73
  • 149
0
votes
1 answer

Parse.com pushnotification shedule error

I am trying to set a push notification background job. - I am getting following error while running the background job- E2015-02-15T21:45:23.581Z] v20: Ran job push_job with: Input: {} Failed with: success/error was not called This is my code-…
0
votes
1 answer

Connecting to a parse database via webhooks

I am trying to connect my mailparser.io account to my Parse Database. Everything I have found says to do so via Parse Cloud Code and webhooks. However, I havent been able to find any examples of what the code might look like and what URL to send the…
0
votes
2 answers

Can't edit main.js for Parse Cloud Code

I have is installed Parse Cloud Code on my Mac but I can't edit the main.js to edit my cloud code. What am I missing?
0
votes
2 answers

Parse Cloud Code Sending Push Notification Twice

I am trying to send a push notification using cloud code to targeted channels. The Object is called Prayers. When someone saves Prayers, it is supposed to send a push notification to certain channels, if the new data in Prayers was not made…
user717452
  • 33
  • 14
  • 73
  • 149
0
votes
1 answer

Parse.com: Authenticate user before updating object?

The scenario is similar to Evernote: a user can own multiple notes that can be viewed publicly but cannot be edited by anyone other than himself. (I have implemented creating notes, but now get confused on updating notes. Have read docs of data &…
user3332315
  • 141
  • 4
0
votes
1 answer

HTTP Post request not executing to success or error

I'm having trouble with my HTTP post request in Cloud Code and for some reason it's not actually getting to the success or error messages. It will log out the JSON variable that I've encoded, but seems to not execute the HTTP request at all. Any…
Jake Lisby
  • 494
  • 5
  • 21
0
votes
1 answer

Parse Cloud Code save() doesn't seem to save a field

I'm trying to run save() on a retrieved _User object, but it doesn't seems to save the field I've modified ("ignoredUsers"), which is an array. Although I can see that the save actually went through, as updatedAt does change. Here is the code: …
Nikolay Derkach
  • 1,734
  • 2
  • 22
  • 34
0
votes
1 answer

parse deploy for cloud code not working

Today I tried to upload some new files to parse cloud. As usual I performed the parse deploy command, but this time it didn't finish, it gets stuck in uploading source files notice, no error is shown so far. I left it there for more than 30…
0
votes
1 answer

Please show me the basic pattern for Parse Promises

I'm having trouble wrapping my head around Parse Promises. I'm trying to save an object that could have an image. I can save the post, but the image is never saved. Here's my attempt at getting the promises to work. var savePromise = new…
slammer
  • 278
  • 3
  • 9
0
votes
0 answers

Parse.com Cloud Code - Return ParseObject in SaveAll response

query.get(playerID, { success: function(player) { var numOfCoins = activeTeam.get("numOfCoins"); var playerPrice = player.get("price"); // Check if they have enough coins if(numOfCoins >= playerPrice) { …
0
votes
1 answer

Issue with Parse Cloud Code

I've just started working in Parse by using the cloud code guide https://parse.com/docs/cloud_code_guide but stuck in averageStars project. This is my code: var Review = { "movie" : "The Matrix", "stars" :…
maou
  • 23
  • 5
0
votes
1 answer

Using Parse's cloud code to automatically push an object from one user to another

I have a feature on my app where one user fills out a form and it saves it to parse. I want to have the object that is saved be sent to user b (there is a pointer to user b in the saved object). I have an afterSave function written for doing this,…