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
2
votes
0 answers

Update entire column of a table in parse using javascriptCode

I created a new column in a table of 10k records. Now I want to update/fill that column with some value. I am using following javascriptcode. function updateAll(query, updater) { return query.each(function(object) { updater(object); …
Ahsan aslam
  • 1,149
  • 2
  • 16
  • 35
2
votes
1 answer

Increment Likes in Objective-C / Parse Cloud Code

I am making a social app using Objective-C and Parse. I am trying to write cloud code to increment likes (which is part of the secured User class) upon a button click. This is what I have as of now: Cloud Code Parse.Cloud.define("incrementLikes",…
user3784214
  • 105
  • 9
2
votes
1 answer

Parse Cloud Code Mandrill Promise

So I am having an issue migrating away from Mailgun and start using Mandrill. I followed the Parse Purchase application tutorial and have a very similar code base. Here is what it currently is and successfully runs. return Mailgun.sendEmail({ …
jsetting32
  • 1,632
  • 2
  • 20
  • 45
2
votes
1 answer

Create new PFUser using code without logging in as this new PFUser

I am creating a new PFUser to be a "sub user" of the currently logged in user. For example Master is logged in and decides to create a Junior User. The Junior user will have a different PFRole to the Master. I can create a new User via var…
DogCoffee
  • 19,820
  • 10
  • 87
  • 120
2
votes
1 answer

Stripe and Parse SDK to store credit card

I am attempting to store a users credit card into stripe. I have a form all setup using Payment Kits PTKView. Then once the user taps the save button, I create a STPToken which is required by Stripe. Once the token is made, I attempt to save the…
2
votes
2 answers

Parse Cloud: Query not running in exported function from save() callback

I'm using Parse to represent the state of a beer keg (among other things). I'd like to check the user's notifications, stored in a "Notifications" table, to see if they'd like to receive a notification when the keg is filled. I have all of the logic…
Mel
  • 959
  • 5
  • 19
2
votes
0 answers

Include pointers in array of pointers in Parse Javascript query

I know how to load the objects pointed in a pointer array in Parse (thanks to this link: https://www.parse.com/questions/include-pointer-in-array-of-pointers). However, I need to load objects pointed inside the array of pointers, too (which would be…
Can Poyrazoğlu
  • 33,241
  • 48
  • 191
  • 389
2
votes
1 answer

Parse After_Delete Update Counters

I'm using Parse cloud code to update some counters on a user when after_delete is called on certain classes. A user has counters for subscriptions, followers and following that are incremented in the before_save for subscriptions and follows and…
toddg
  • 2,863
  • 2
  • 18
  • 33
2
votes
0 answers

Retrieve roles for user with user objectID in Cloud Code

I'm trying to retrieve roles for a desired user where I know if objectId. exports.User.getUserRole = function(userId, success, error) { Parse.Cloud.useMasterKey(); console.log("getUserRole method"); var query = new Parse.Query(Parse.User); …
Jean Lebrument
  • 5,079
  • 8
  • 33
  • 67
2
votes
1 answer

Download image from url Parse Cloud Code

I'm trying to download a facebook profile photo using Parse Cloud Code and save it, however, it seems the redirect is not working properly - can someone give me some guidance? Thanks! Parse.Cloud.httpRequest({ url: pictureURL, …
slammer
  • 278
  • 3
  • 9
2
votes
1 answer

How to prevent user editing a specific column while still having write access to the object on Parse?

I have some specific columns on my _User class that I want to edit only with master key at the server side. My User does have write access to itself. Is there a way to prevent my user from editing specific columns, for example, let's say I have a…
Can Poyrazoğlu
  • 33,241
  • 48
  • 191
  • 389
2
votes
1 answer

Group By Query in Parse.com Cloud Code

I'm trying to get the results of the following sql command in Parse.com using cloud code. Select shop, count(1) from Membership group by shop; Is there a way to do so? or I can only get the number of members from selecting each shop? var query = new…
Ng Zhong Qin
  • 1,211
  • 2
  • 15
  • 28
2
votes
1 answer

Parse JavaScript SDK and Promise Chaining

I have created a Background Job in Parse Cloud Code that sends out email notifications based on a date in one of my Parse classes. Here is the idea: Query the class that contains the date. Iterate over each object returned and check the date field.…
toddg
  • 2,863
  • 2
  • 18
  • 33
2
votes
2 answers

download cloud code content & web hosting files

ok, I blew up my repository, and murphy's law being what it is, plenty of other files were not 'versioned'. Nothing like screwing up to get rid of bad habits. Is there a way to download the cloud code files and web hosting files from Parse ?…
Alex
  • 1,581
  • 1
  • 11
  • 27
2
votes
1 answer

Overriding Email/Username with Cloud Code and PFFacebookUtils

While utilizing the Parse service, I'm trying to allow users to skip sign-in fields by logging into the app via Facebook and using the Facebook information to fill in fields. I'm using Parse's Cloud Code to make the swift client-side code as simple…