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
1
vote
1 answer

Back4App push notifications via Parse Server not working for iOS

Update 2: Still dealing with the same problem, but I realised that my approach might be flawed - that I cannot send push notifications from Parse Server via Firebase Cloud Messaging to iOS devices the same way I do it for the Android…
1
vote
3 answers

Nested function & Promise chaining with error handling trouble - how can I get this to work?

I have learned promise chaining with error handling to my satisfaction as per below first code section. But I am unable to get the following principle working with my Parse Cloud Code. My Cloud code works well but I have monster functions I need to…
RobbB
  • 1,214
  • 11
  • 39
1
vote
2 answers

How could you model Parse database for secure multi-user shared object access?

I'm trying to model my Parse database for ACL access with Roles. Roles will contain many users so that users can have groups with whom they share data. I am also locking all CLPs 100%. Only User will have public find() & write() access for login and…
RobbB
  • 1,214
  • 11
  • 39
1
vote
0 answers

Javascript documentation is vague in VS Code, is there a plugin to show more?

Excuse my naïvety, but I find Flutter/Dart documentation very intuitive and easy to use in VS Code. Same goes for Android Studio when I was using it. Now using VS Code for javascript and Parse Cloud code there is almost zero documentation. Am I…
RobbB
  • 1,214
  • 11
  • 39
1
vote
2 answers

beforeSave doesn't modify request.object

I'm trying to add some additional attributes for new user through cloud code: Parse.Cloud.beforeSave(Parse.User, (request) => { if (!request.original) { // New user Parse.Config.get() .then((config) => { …
Phineas
  • 159
  • 2
  • 10
1
vote
0 answers

Parse GeoPoint aggregate query

I want to use that in my cloudCode. I'm on Parse server 4.2. I would like to know if it's possible de create a Parse Query and to use agregate on field with geoNear or geoWithin ? Something like that for example: const userLat = 43.3; const userLng…
mistralaix
  • 29
  • 1
  • 4
1
vote
1 answer

Parse Cloud Code Queries do not return anything ever

I have some parse cloud code im running on my self hosted server but im running into an issue where queries are not doing anything. I can run commands through terminal and get data back but when I run a query.find.. nothing happens. For…
trever
  • 961
  • 2
  • 9
  • 28
1
vote
2 answers

Parse Cloud function returns empty object after upgraded from Parse Server 2.8.4 to 3.0+

I have been trying to migrate my Cloud functions from Parse Server 2.8.4 to 3.0+. This following Cloud function aims to return count of GCUR_OBSERVATION to the client. I intended to use native promises in synchronous instead of…
alextc
  • 3,206
  • 10
  • 63
  • 107
1
vote
1 answer

How to make Parse.File url's private?

I have small app which has a feed section where user can post the data with images and can set post visibility to either public or followers only. For this, I am having Parse Server configured on Heroku with mLab resource and using GCS adapter…
1
vote
1 answer

ParseError when using Nested Cloud Code functions with Promises

I need help as I'm a bit new to Promises and working with Cloud Code at the moment. I've checked other questions here on stackoverflow but they seem to be all outdated using the deprecated Parse.Promise class. Note: I am working on a locally…
Jayson
  • 528
  • 4
  • 13
1
vote
1 answer

Using setTimeout() to Schedule pushes

Since Scheduled push is not available on Parse , I'm using setTimeout() to schedule pushes. I'm using back4app. // I call this cloud code Parse.Cloud.define("pushMultiple",async (request) => { //Using set timeout to send out a push 1 hour later …
1
vote
1 answer

Schedule Push notification on Parse

I was wondering if Schedule Push is available on Parse Server? (I'm using Back4App) Here is my cloud code: Parse.Cloud.define("pushMultiple",async (request) => { //Getting Current Date instance var d = new Date(); //Where I live…
1
vote
1 answer

What is the point of "return" in afterSave handler in Parse

I'm confused as to what the purpose of the return keyword is in afterSave handlers. As far as I know it does not return the result to the client , if so then where is it returning the result to? Pic from Cloud Code documentation give below for…
Tanzim Chowdhury
  • 3,020
  • 2
  • 9
  • 21
1
vote
2 answers

Create a blank profile when user signs up

I know this question has been asked on here once before but I need to know if parse has done anything about it. My default user table has a pointer field to a UserProfile class. On signup I have this cloud code…
1
vote
1 answer

How to set Acl for User class in cloud code using before save trigger?

Hello here is my cloud code Parse.Cloud.beforeSave(Parse.User,async (request)=>{ const user = request.object; const t = user.get('tProfile'); const s = user.get('sProfile'); if (!t && !s) { user.setACL(new…