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
5
votes
3 answers

Restrict users from updating certain fields but allow backend to edit them

I store some fields on User model that should never be edited by users themselves, but instead should be updated by backend only. So I do validation on beforeSave: // import all models var Models = require('cloud/models/index'); // Models.User is a…
pronebird
  • 12,068
  • 5
  • 54
  • 82
5
votes
2 answers

How to delete rows in Parse that satisfy some conditions?

Is there any way to effectively delete rows in Parse that do something like this SQL statement? DELETE FROM table WHERE delete_me = 1 I've tried this, but it's very slow: var query = new Parse.Query('table'); query.equalTo('delete_me',…
iForests
  • 6,757
  • 10
  • 42
  • 75
5
votes
1 answer

Parse.com Cloud code Error: success/error was not called when trying to update a user

ive never used cloud code/javascript and I am trying to write some parse cloud code to find a user using a objectId passed in to the cloud function, and then update that users relation that holds friends and finally save that user. below is the…
Stone Preston
  • 1,828
  • 4
  • 20
  • 35
4
votes
1 answer

CORS error when using Back4App Parse Cloud Code Function

I have a Parse backend running on Back4App. They have a cloud code capability that lets you put NodeJs like functions that you can call from the javascript on your site. I'm not that familiar with NodeJs so there may be something wrong with my…
Ben Anderson
  • 1,069
  • 2
  • 16
  • 38
4
votes
2 answers

Saving jpg file with cloud-code Parse-Server

I'm trying to save jpg files with cloud code on parse server ... On Android I can do it using this way Bitmap bitmap = ((BitmapDrawable) myImageView.getDrawable()).getBitmap(); ByteArrayOutputStream stream = new ByteArrayOutputStream(); …
4
votes
2 answers

Parse Cloud code not responding error or success with promises

My Parse cloud code is not responding with an error or success. It just times out, I don't know what I'm doing wrong. It should save multiple values in different tables, and finish with sending a push message to a user. The push message and user…
Lengo
  • 342
  • 7
  • 14
4
votes
2 answers

Parse Cloud Code Logging

Basically with default parse setup on AWS server. I want to debug my cloud code I recently updated with Promise, Arrow Functions, useMasterKey:true.. stuffs like these. What I am expecting? I have defined a hello world cloud…
OS Idris
  • 99
  • 1
  • 9
4
votes
0 answers

Parse Server CloudCode - 502 Bad Gateway in AWS Elastic Beanstalk when updating cloud folder

So I created my Parse Server on AWS EB using the press button method here: https://github.com/ParsePlatform/parse-server-example And then it set up and was running fine. I then created a directory on my local machine (I already have EB CLI…
4
votes
2 answers

How to deploy cloud code on AWS hosted Parse server

I am new to AWS elastic beanstalk. I have deployed the Parse example server using deploy to AWS button in the Parse Server Example Link. I want to update the cloud code in main.js but I don't know how can I deploy the cloud code the way I was…
Asadullah Ali
  • 1,056
  • 14
  • 31
4
votes
1 answer

Error "Unable to complete HTTP request" (code 141) with Parse Cloud Code

we use Twilio (SMS sending platform) to send SMS via Parse Cloud Code. We create the following js method to perform that : var client = require('twilio')(CONSTANTS.SMS_TWILIO_ACCOUNT_SID, CONSTANTS.SMS_TWILIO_AUTH_TOKEN); function sendSMS(from, to,…
Greensource
  • 221
  • 2
  • 9
4
votes
1 answer

Parse.com/CloudCode Promises not quite clear

I'm stuck with this Problem and couldn't find an answer. I wrote the following Function in Cloud Code. function getSoccerData() { console.log("Entering getSoccerData"); var promise = Parse.Cloud.httpRequest({ url:…
weka1
  • 737
  • 2
  • 9
  • 20
4
votes
1 answer

Parse Javascript - How to query by relationship object's attribute

I am wondering if there is a way to directly query objects by relationship object's attribute? It might sound confusing, for example: Each user have many installations, I have pointer from each installation to its user, forming a many to one…
4
votes
1 answer

Passing in Parse Object into a cloud code function

I have a cloud code function that creates a GuestlistInvite Object. It takes a phoneNumber, a guestlist Object, and a guest Object. I call on the function like so: Parse.Cloud.run('createGuestlistInviteForExistingUser', { phoneNumber:…
azmuth94
  • 95
  • 7
4
votes
2 answers

iOS + Parse Cloud Code - updating a specific user (not logged in user)

I am trying to update a user (Which is not the current user). I figured that you have to use cloud code to make the update. I have created the cloud function below to update the selected user. I am trying to add meetingId's to an array property…
TheRealRonDez
  • 2,807
  • 2
  • 30
  • 40
4
votes
1 answer

Validating auto-renewable subscription receipt and updating Parse using Cloud Code

I am developing an iOS app that uses Parse as the backend and users subscribe using Apple's auto-renewable subscription IAP. During the Subscribe and Restore Purchases functions, I pass the receipt as a parameter in a Cloud Code function and then…
1 2
3
74 75